当我尝试使用CocoaLibSpotify构建项目时,我遇到了这个错误。
ld: warning: directory not found for option '-FLibrary/libspotify-12.1.64-iOS-universal'
ld: warning: ignoring file /Users/tgm/Library/Developer/Xcode/DerivedData/CocoaLibSpotify_iOS_Library-gtxluzeubophcpfplfiyijlecxzt/Build/Products/Debug-iphoneos/libCocoaLibSpotify.a, missing required architecture x86_64 in file /Users/tgm/Library/Developer/Xcode/DerivedData/CocoaLibSpotify_iOS_Library-gtxluzeubophcpfplfiyijlecxzt/Build/Products/Debug-iphoneos/libCocoaLibSpotify.a (2 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_SPSession", referenced from:
__TMaCSo9SPSession in DetailViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我使用lipo
来检查引用的静态库中的体系结构
$ lipo -info /Users/tgm/Library/Developer/Xcode/DerivedData/CocoaLibSpotify_iOS_Library-gtxluzeubophcpfplfiyijlecxzt/Build/Products/Debug-iphoneos/libCocoaLibSpotify.a
Architectures in the fat file: /Users/tgm/Library/Developer/Xcode/DerivedData/CocoaLibSpotify_iOS_Library-gtxluzeubophcpfplfiyijlecxzt/Build/Products/Debug-iphoneos/libCocoaLibSpotify.a are: armv7 arm64
arm64
不是x86_64
的正确标签吗?
我该怎么办才能解决这个问题?
CocoaLibSpotify不支持iOS版的arm64
(64位设备)或x86_64
(64位模拟器)。要使用CocoaLibSpotify构建应用程序,您只能针对armv6
、armv7
或armv7s
。
对于更现代的库,我可以推荐新的Spotify iOS SDK吗?