目前,我使用了一点CloutKit,并测试了这个教程:
http://www.raywenderlich.com/83116/beginning-cloudkit-tutorial
在编译过程中,我得到模拟器的以下错误:
#import "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk/System/Library/Frameworks/CloudKit.framework/Headers/CloudKit.h"
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk/System/Library/Frameworks/CloudKit.framework/Headers/CloudKit.h:10:9: error: 'CloudKit/CKDefines.h' file not found
#import <CloudKit/CKDefines.h>
^
/Users/steve/Downloads/BabiFud-Starter/BabiFud/Establishment.swift:26:8: error: could not build Objective-C module 'CloudKit'
import CloudKit有趣的是,iOS设备上存在CKDefines文件和编译的代码。
你知道问题出在哪里吗?
PS:我使用的是Xcode6.3.1 (6D1002),应用程序启用了iCloud功能,我已经读了好几遍了:) ....
发布于 2015-06-27 15:10:25
该错误听起来像是缺少CKDefines.h文件。如果你有另一个Xcode,你可以尝试从你的旧Xcode中添加你的CKDefines.h:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/CloudKit.framework/Headers/CKDefines.h并将其复制到Xcode-beta版本:
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/CloudKit.framework/Headers/或者在一个命令中(假设在/Applications/和Xcode.app +Xcode-beta.app中:
cp /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/CloudKit.framework/Headers/CKDefines.h /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/CloudKit.framework/Headers/https://stackoverflow.com/questions/30500233
复制相似问题