升级到Xcode 8之后,应用程序无法在设备上运行,只能在模拟器上运行。所有添加到项目中的pods都会抛出错误:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_AFNetworkReachabilityManager", referenced from:
objc-class-ref in FeedViewController.o
"_OBJC_CLASS_$_TSMessage", referenced from:
l_OBJC_$_CATEGORY_TSMessage_$_Override in NotificationMessenger.o
objc-class-ref in NotificationMessenger.o
"_OBJC_CLASS_$_AFHTTPRequestSerializer", referenced from:
objc-class-ref in HTTPSessionTask.o
"_OBJC_CLASS_$_AFJSONRequestSerializer", referenced from:
objc-class-ref in HTTPSessionTask.o
"_OBJC_METACLASS_$_SWTableViewCell", referenced from:
_OBJC_METACLASS_$_MessagesCell in MessagesCell.o
_OBJC_METACLASS_$_PaymentMethodCell in PaymentMethodCell.o
_OBJC_METACLASS_$_SwipeTitleCell in SwipeTitleCell.o
"_OBJC_CLASS_$_FBRequestConnection", referenced from:
objc-class-ref in FacebookManager.o
"_OBJC_CLASS_$_SWTableViewCell", referenced from:
_OBJC_CLASS_$_MessagesCell in MessagesCell.o
_OBJC_CLASS_$_PaymentMethodCell in PaymentMethodCell.o
_OBJC_CLASS_$_SwipeTitleCell in SwipeTitleCell.o
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in FacebookManager.o
"_OBJC_CLASS_$_AFURLSessionManager", referenced from:
objc-class-ref in HTTPSessionTask.o
"_OBJC_CLASS_$_Branch", referenced from:
objc-class-ref in MyImpactViewController.o
objc-class-ref in UINavigationController+Activity.o
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in FacebookManager.o
objc-class-ref in ExternalFacebookCommand.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
对于每个文件,也会抛出此警告:
file was built for archive which is not the architecture being linked (arm64)
活跃的架构没问题,我已经尝试删除派生数据文件夹、重新安装pods、将“只构建活跃的架构”设置为是和否,但都没有用。
我的Podfile长这样:
platform :ios, '8.0'
workspace 'Purple'
target 'Purple' do
pod 'AFNetworking', '2.6.3'
pod 'SAMKeychain', '~> 1.3'
pod 'TSMessages'
pod 'Facebook-iOS-SDK', '~> 3.23.2'
pod 'SWTableViewCell'
pod 'CardIO'
pod 'Parse'
pod 'PureLayout'
pod 'Branch'
pod 'DZNEmptyDataSet'
end
pod AFNetworking', '~> 3.1.0'
和pod install
命令进行安装,更多信息请参阅 https://github.com/AFNetworking/AFNetworking/blob/master/AFNetworking.podspec。 - Anbu.Karthik