ios - After renaming project i get <XCTest/XCTest.h> not found. -


i first duplicated project before renamed it. after rename i'm getting

lexical or preprocessor issue <xctest/xctest.h> not found.  

the error directs me myapptests.m file calls

#import <xctest/xctest.h> 

also next line

@interface spyshottests : xctestcase 

the "xctestcase" not hi-lighted in purple.

any tutorial i've seen has directed me framework search paths in build settings - framework search path same initial file , file builds no issues.

i came across similar , i'm wondering if solution might helpful.

you may want check file throwing error included in appropriate target source's "compile sources". it's possible file might not have been included. in case had been included project target , not test target. since xctest accessible test target, wouldn't compile me generating error "xctest/xctest.h file not found".

project targets >> build phases >> compile sources: making sure test file added compile source test target.

you can fix either manually adding "compile sources" per above image or can remove file project , re-add it, making sure select test target when re-add: adding new file test target.

in case helps else came across after moving test case file (in file system) , re-adding test project (right click, 'add files "project"...'). turns out wasn't adding file test target - adding project target.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -