XCode - iOS: Can't resolve conflict between CocoaLibSpotify and Parse framework

放肆的年华 提交于 2019-12-20 03:17:54

问题


I have an XCode project that uses the Parse API, but I'm now trying to integrate the cocoa touch wrapper for spotify. I'm getting an extremely frustrating linker error that I've literally been working at for two hours with no avail. Any help would be much appreciated! Here's the error. Thanks!

Undefined symbols for architecture x86_64:
  "_FBTokenInformationExpirationDateKey", referenced from:
      -[PFFacebookTokenCachingStrategy cacheTokenInformation:] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy expirationDate] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy setExpirationDate:] in Parse(PFFacebookTokenCachingStrategy.o)
  "_FBTokenInformationTokenKey", referenced from:
      -[PFFacebookTokenCachingStrategy accessToken] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy setAccessToken:] in Parse(PFFacebookTokenCachingStrategy.o)
  "_FBTokenInformationUserFBIDKey", referenced from:
      -[PFFacebookTokenCachingStrategy facebookId] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy setFacebookId:] in Parse(PFFacebookTokenCachingStrategy.o)
  "_OBJC_CLASS_$_FBAppCall", referenced from:
      objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
  "_OBJC_CLASS_$_FBRequest", referenced from:
      objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
  "_OBJC_CLASS_$_FBSession", referenced from:
      objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
  "_OBJC_CLASS_$_FBSessionTokenCachingStrategy", referenced from:
      _OBJC_CLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
  "_OBJC_METACLASS_$_FBSessionTokenCachingStrategy", referenced from:
      _OBJC_METACLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

回答1:


  1. Parse is linking to a Facebook SDK.
  2. The project you are using is attempting to build x86_64 (the simulator).
  3. The linker is trying to load symbols from Parse that use the Facebook SDK.

I'm making a guess here, but are you doing -all_load for CocoaLibSpotify?

See: Using the Parse iOS SDK without including the Facebook SDK


after sending poor Zack on a fetch quest

  • Remove -ObjC and -all_load
  • Add -force_load <CocoaLibSpotify library name> to load only CocoaLibSpotify.


来源:https://stackoverflow.com/questions/20928940/xcode-ios-cant-resolve-conflict-between-cocoalibspotify-and-parse-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!