XCode 7 dyld: 设置后找不到符号 ENABLE_BITCODE=NO

XCode 7 dyld: Symbol not found after setting ENABLE_BITCODE=NO

我已经安装了 Xcode 7 beta 3,我可以 运行 我的代码可以在模拟器上运行,但不能在我的设备上运行。我无法构建并收到警告:

ld: warning: directory not found for option '-F/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/Developer/Library/Frameworks'
ld: -bundle and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together

所以我设置了 ENABLE_BITCODE=NO,现在设备已构建,但它因错误而崩溃:

dyld: Symbol not found: __TMdVSS5Index
  Referenced from: /private/var/mobile/Containers/Bundle/Application/75C6AF90-20D1-4CC7-B206-94C8FAD41DEF/BiggerCity.app/Frameworks/Alamofire.framework/Alamofire
  Expected in: /private/var/mobile/Containers/Bundle/Application/75C6AF90-20D1-4CC7-B206-94C8FAD41DEF/BiggerCity.app/Frameworks/libswiftCore.dylib
 in /private/var/mobile/Containers/Bundle/Application/75C6AF90-20D1-4CC7-B206-94C8FAD41DEF/BiggerCity.app/Frameworks/Alamofire.framework/Alamofire

我的 Podfile 是:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'swift-2.0'
pod 'PubNub', '3.7.10.8’

有谁知道可能导致此错误的原因是什么?自从我安装 Xcode 7 后才发生。Xcode 6 运行 就好了。

看起来你(而不是AlamoFire)正在使用Swift,因此你需要打开嵌入的内容包含Swift代码在目标 Build Settings 和 Xcode 中将在构建应用程序时包含所有 Swift .dylib 文件。

您可能使用了错误版本的 AlamoFire 框架,因为使用此特定版本意味着 .dylib 文件需要与应用程序捆绑在一起,因此您只能定位 iOS 8+。我会寻找在 Objective-C.

中实现的版本

我需要做的是清理和删除派生数据。在我这样做之后,我能够 运行 我的设备上的应用程序。