1

我已经安装了 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 运行良好。

4

2 回答 2

2

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

于 2015-07-13T13:52:35.387 回答
0

看起来您(而是)正在使用 Swift,因此您需要在目标Build SettingsAlamoFire中打开Embedded Content Contains Swift Code ,并且 Xcode 将在构建应用程序时包含所有 Swift 文件。.dylib

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

于 2015-07-10T14:55:52.977 回答