出于某种原因,我的应用程序将在我的设备上安装并运行正常,但当我尝试在iPhone模拟器上安装我的应用程序时,我收到以下警告:
ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit, missing required architecture i386 in file
ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/Foundation.framework/Foundation, missing required architecture i386 in file
ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics, missing required architecture i386 in file
ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/CFNetwork.framework/CFNetwork, missing required architecture i386 in file
ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox, missing required architecture i386 in file
ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices, missing required architecture i386 in file
ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration, missing required architecture i386 in file
ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/QuartzCore.framework/QuartzCore, missing required architecture i386 in file
这会导致一堆错误,这些错误只会在那些框架不存在时才会发生。错误如:
"_OBJC_CLASS_$_NSMutableCharacterSet", referenced from: objc-class-ref-to-NSMutableCharacterSet in SBJsonWriter.o
答案 0 :(得分:3)
答案是:
1)Base SDK应该是Device
2)iPhone SDK Frameworks被复制到您的项目目录中(在磁盘上)。打开项目目录并删除任何标准的iPhone SDK框架。
3)清理缓存并重建
答案 1 :(得分:3)
我遇到了同样的问题。这是因为在启用“复制”选项的情况下将框架从一个项目拖动到另一个项目。 即使我后来取消引用这些框架并正确添加它们,它仍然给了我这些错误,直到我从项目中删除了框架目录。
答案 2 :(得分:0)
它正在尝试构建设备库以在模拟器上使用。路径应如下所示:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit
...使用iPhoneSimulator.platform
代替iPhoneOS.platform
。检查您的构建设置,清理项目并清空Xcode缓存(Xcode> Empty Cache ...)。
答案 3 :(得分:0)
如果我没记错的话,如果你使用基础SDK> 3.2,您应该将架构设置为优化。这是armv7。
我不确定。
〜纳塔纳瓦拉。
答案 4 :(得分:0)
我认为您将iPhone设备x.x而不是iPhone Simulator x.x设置为基本SDK。 当我这样做的时候,类似的事情依赖于我。
答案 5 :(得分:0)
我想出了一个解决办法。我将基本SDK设置为iPhone Simulator 4.0,并且因为它仍然试图从iPhoneOS获取SDK,我将iPhoneOS.platoform
重命名为iPhoneOS_2.platform
,因此Xcode无法从该平台访问SDK。
答案 6 :(得分:0)
您需要在顶部菜单栏上构建并按清除所有目标
选项