找不到 XCTest/XCTest.h 文件 XCode 5.1.1 iOS7 [英] XCTest/XCTest.h file not found XCode 5.1.1 iOS7

查看:41
本文介绍了找不到 XCTest/XCTest.h 文件 XCode 5.1.1 iOS7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在这里学习使用钥匙串的教程 http://code.tutsplus.com/tutorials/securing-and-encrypting-data-on-ios--mobile-21263.我创建了一个新项目(通用而不是 iPhone,因为我想在其中使用它的应用程序将是通用的)并通过将文件夹复制到我的项目中来添加 SSKeychain 库和 RNCryptor 库.

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.

但是,当我构建时,我收到来自 XCtestCase+RNCryptorVectorTests.h 的错误消息,说找不到词法或预处理器问题 'XCTest/XCTest.h' 文件.我搜索过谷歌和堆栈溢出,但尽管其他人遇到了问题使用 XCTest/XCTest.h,他们的解决方案对我不起作用.我该怎么办?

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?

推荐答案

您的项目中可能有一个自动创建的测试用例文件夹,名为 MyProjectTests.

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

其中有一个将导入 XCTest 的 m 文件.

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

该错误暗示未找到 XCTest.h,这意味着未链接 XCTest 库.如果您不打算使用测试,则可以删除所有测试文件.否则,请确保您已链接 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.

这篇关于找不到 XCTest/XCTest.h 文件 XCode 5.1.1 iOS7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆