每次从CocoaPods导入文件时,我都会收到Apple Mach-O链接器错误.
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FBSession", referenced from: someFile
ld: symbol(s) not found for architecture arm64
Run Code Online (Sandbox Code Playgroud)
对于我使用的各种Pod,我得到了大约12个.
我正在尝试使用XCode 5为iPhone 5S构建.
我一直在尝试使用SO的各种解决方案,但还没有任何解决方案.
如何修复Apple Mach-O链接器错误?
刚发现另一个可能有趣的警告,我希望这能引导我找到解决方案:
Ignoring file ~/Library/Developer/Xcode/DerivedData/SomeApp/Build/Products/Debug-iphoneos/libPods.a,
Run Code Online (Sandbox Code Playgroud)
file was built for archive which is not the architecture being linked (arm64):~/Library/Developer/Xcode/DerivedData/someApp/Build/Products/Debug-iphoneos/libPods.a
我有一个已经存在于CocoaPods/Specs中的库的公共分支.在Podfile中,我可以通过执行以下操作来引用此分叉的pod:
pod 'CoolLibrary', :git => 'git@github.com:myname/CoolLibrary-Forked.git', :commit => 'abcdef1234567890abcdef1234567890'
Run Code Online (Sandbox Code Playgroud)
我试着把它放在我的MyLibrary.podspec:
s.dependency 'CoolLibrary', :git => 'git@github.com:myname/CoolLibrary-Forked.git', :commit => 'abcdef1234567890abcdef1234567890'
Run Code Online (Sandbox Code Playgroud)
但是请收到以下错误消息:
-> MyLibrary.podspec
- ERROR | The specification defined in `MyLibrary.podspec` could not be loaded.
[!] Invalid `MyLibrary.podspec` file: [!] Unsupported version requirements. Updating CocoaPods might fix the issue.
Run Code Online (Sandbox Code Playgroud)
是否可以以这种方式在.podspec中指定依赖项(即对于具有podspec但不在CocoaPods/Specs中的pod)?
我正在使用firebase作为我在iOS中工作的项目的一部分,当我尝试针对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)
Run Code Online (Sandbox Code Playgroud)
我正在使用Xcode 8.2.1,swift 3.0,我的项目中也有以下Pod文件
pod 'Braintree'
pod 'Firebase/Auth'
pod …Run Code Online (Sandbox Code Playgroud)