我正在iOS项目中使用Firebase,当我试图编译针对iPhone 6或7模拟器的代码进行测试时,我遇到了以下链接错误。
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GTMSessionUploadFetcher", referenced from:
objc-class-ref in FirebaseStorage(FIRStorageUploadTask_d5061b1e2b5f1bb249816cc5fc42ff62.o)
"_OBJC_CLASS_$_GTMLogger", referenced from:
objc-class-ref in FirebaseMessaging(GIPReachability_ae5504e4a6a28a1d8997c6f38e8bff8b.o)
"_kGTMSessionUploadFetcherStandardChunkSize", referenced from:
-[FIRStorageUploadTask enqueue] in FirebaseStorage(FIRStorageUploadTask_d5061b1e2b5f1bb249816cc5fc42ff62.o)
"_GTMFetcherStandardUserAgentString", referenced from:
-[FIRAuthBackendRPCIssuerImplementation init] in FirebaseAuth(FIRAuthBackend_ea73237c278bd1b78e1c76db2a16775a.o)
"_OBJC_CLASS_$_GTMSessionFetcher", referenced from:
objc-class-ref in FirebaseStorage(FIRStorageDownloadTask_c390366e83519f6636ca985ecb70e5d0.o)
objc-class-ref in FirebaseStorage(FIRStorage_691ea9ac7cb4d224d37df2ff8a911989.o)
"_OBJC_CLASS_$_GTMSessionFetcherService", referenced from:
objc-class-ref in FirebaseAuth(FIRAuthBackend_ea73237c278bd1b78e1c76db2a16775a.o)
objc-class-ref in FirebaseStorage(FIRStorage_691ea9ac7cb4d224d37df2ff8a911989.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我正在使用 Xcode 8.2.1,swift 3.0,并且我也在我的项目中使用以下 Pod 文件
pod 'Braintree'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Core'
pod 'Firebase/Storage'
pod 'Firebase/Messaging'
pod 'Firebase/RemoteConfig'
pod 'GeoFire', :git=>'https://github.com/firebase/geofire-objc.git'
pod 'ObjectMapper', '~> 2.2'
我已经执行了pod update以确保没有过期的内容,但是没有成功。当我使用iPhone 4或5模拟器时,代码可以编译并运行得很好。
编辑:
我已将“Build Active Architectures”设置为“No”,在有效架构中列出了arm64、armv7和armv7s,但现在Objectmapper失败了,尽管在文件中声明了 import ObjectMapper
。
Use of undeclared type 'Mappable'
任何帮助都将不胜感激!提前谢谢。 George.