导入“CoreData/CoreData.h”时出错
我刚刚完成了我的第一个成功的 CoreData 存储和获取,它在模拟器中运行良好,但无法在我的设备上运行(我遇到了数十个错误)。大多数错误都是链接错误,我可以通过删除 CoreData 框架的所有链接,然后在构建阶段选项卡中重新链接来修复它们。这解决了为我的设备构建时的大部分错误,但在为模拟器构建时引入了 2 个错误。尽管我检查了文件目录并且似乎没问题,但这些错误都是相同的“CoreData/CoreData.h 文件未找到”。我还有另一个使用 CoreData 的教程中的应用程序,它运行良好并且具有相同的文件目录。具体来说,错误出现在我的 NSManagedObject 类中,这些类是从 .xcdatamodel 中新鲜出来的,并且显然发生在我 import 的行上。
I just finished my first successful CoreData store and fetch which worked fine in the simulator, but wouldn't run on my device (I got dozens of errors). Most of the errors were link errors and I was able to fix them by deleting all the links to the CoreData framework and then re-linking it in the build phases tab. This solved most of the errors when building for my device, but introduced 2 errors when building for the simulator. The errors are all the same thing "CoreData/CoreData.h file not found" although I checked the file directory and it seems to be fine. I also have another app from a tutorial that uses CoreData and it runs fine and has the same file directory. Specifically, the errors are in my NSManagedObject classes, fresh out of the .xcdatamodel and obviously occur on the line where I import .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论