如何确保我的静态库具有适合CocoaLibSpotify的体系结构?

时间:2014-10-21 15:41:16

标签: swift libspotify cocoalibspotify-2.0

当我尝试使用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的正确标签吗?

我该怎么做才能解决这个问题?

1 个答案:

答案 0 :(得分:2)

CocoaLibSpotify不支持iOS的arm64(64位设备)或x86_64(64位模拟器)。要使用CocoaLibSpotify构建应用,您只能定位armv6armv7armv7s

对于更现代的图书馆,我可以建议新的Spotify iOS SDK吗?