ios - Can't import main swift classes into test target? -


i trying test classes in ios app. trying import target pickle in app has classes testing target pickletests adding import pickle top of pickletests.swift testing file, keep getting error.

the error keep receiving is: "failed import bridging header (path bridging header)" (the path bridging header shown in error, not parentheses).

i have tried setting "defines module" in build settings pickle target "yes", still doesn't work. have verified in build settings has correct path bridging header file.

ideas how can set testing? on xcode 6.3.2. please let me know if need additional info.

open image in new tab see larger.

many @matt helping me one!

right click on images , open them in new tab see them larger.

as discussed on https://github.com/cocoapods/cocoapods/issues/2695 issue seemed lying having cocoapods part of project. answer near bottom of link solves issue involves clicking on application settings, , clicking on project info (not of targets' settings). there see configurations settings: enter image description here

you notice there 2 targets in config settings, , testing target config settings set none while main target linked cocoapods. fix lies in changing none value next testing target same thing main target has: enter image description here

so both linked cocoapods. making sure main target has defines module set yes in build settings, build project , error in testing files should go away.

also, after did fix encountered error linker throwing error complaining missing library in testing target. missing library dependency had in project, , solved error making sure of dependencies linked in main target's link binary libraries in build phases settings copied on testing target's link binary libraries in build phases settings.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -