简体   繁体   中英

XCTest/XCTest.h file not found XCode 5.1.1 iOS7

I'm following a tutorial on using Keychain here http://code.tutsplus.com/tutorials/securing-and-encrypting-data-on-ios--mobile-21263 . I create a new project (universal not iPhone since the app I want to use it in will be universal) and add SSKeychain library and the RNCryptor library by copying the folders into my project.

However when I build I get an error from XCtestCase+RNCryptorVectorTests.h saying "Lexical or Preprocessor Issue 'XCTest/XCTest.h' file not found. I've searched google and stack overflow, but although other people have had issues with XCTest/XCTest.h, their solutions did not work for me. What should I do?

You probably have an auto created folder for test cases in your project called MyProjectTests.

In there is an m-file that would be importing XCTest.

The error is implying that XCTest.h is not found, which means that the XCTest-library isn't linked. If you don't plan on using tests, you can remove all the test files. Otherwise, make sure that you have linked the XCTest-library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM