iOS 应用程序无法在设备上编译,但在模拟器中运行良好

标签 ios xcode ios5 ios6 xcode4.5

我假设这与链接有关,但我删除了 RestKit 并重新添加了它。我确保我所有的连接和链接都已到位。如果我将 XCode 设置为使用模拟器,它运行良好,但一旦我将它设置为在任何设备上运行,它甚至无法构建。唯一需要注意的是,在我升级到 XCode 4.5 之前,这并没有开始发生。以下是它给我的错误

ld: warning: ignoring file /Users/luke/Library/Developer/Xcode/DerivedData/ehrx-btsujlxuhtytahfaikwjeqfjybtt/Build/Products/Debug-iphoneos/libRestKit.a, file was built for archive which is not the architecture being linked (armv7s): /Users/luke/Library/Developer/Xcode/DerivedData/ehrx-btsujlxuhtytahfaikwjeqfjybtt/Build/Products/Debug-iphoneos/libRestKit.a
Undefined symbols for architecture armv7s:
  "_OBJC_CLASS_$_RKClient", referenced from:
      objc-class-ref in ehrxAppDelegate.o
      objc-class-ref in ehrxLoginView.o
      objc-class-ref in ehrxInboxView.o
      objc-class-ref in ehrxCMView.o
      objc-class-ref in ehrxEncounterDemoView.o
      objc-class-ref in ehrxEncounterDiagListView.o
      objc-class-ref in ehrxEncounterChargeView.o
      ...
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

这些是 RestKit 的build设置。 enter image description here

最佳答案

看起来这些框架不是为在 armv7s 设备上工作而构建的,如果不需要,请将其从build设置中的“有效架构”中删除。

如果没有,您将不得不更新它们以在 armv7s 上工作

关于iOS 应用程序无法在设备上编译,但在模拟器中运行良好,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12736356/

相关文章:

ios - 如何在应用程序文件夹中创建文件夹

android - Android 媒体录音机需要多少放大系数才能匹配 iOS AVAudioRecorder 的输出?

ios - SFSafariViewController 会泄露用户数据吗?

ios - 设置应用程序图标 (Xcode 7)

iphone - 将 BOOL 值设置为 NSMutableDictionary

ios - Objective-C如何生成具有n个值的钟形曲线数组?

iphone - 如何从 shell 脚本读取 plist 信息(bundle id)

ios - 侧面菜单 View 未显示

iphone - 用于访问 SMS 并将其存储在 iCloud 上的 Iphone 应用程序

iphone - Storyboard静态单元格 : dequeueReusableCellWithIdentifier returns nil