Search code examples
iosxcodeparse-platformgoogle-maps-sdk-ios

Google Map SDK on IOS Apple Mach-O Linker Error


I'm developing an app that requires a map. I'm using the parse sdk in it swell as google places autocomplete. I followed twice the instructions on how to implement the sdk on my app and still i get 14 errors "Apple Mach-O Linker Error". Here are the errors i get:

Undefined symbols for architecture x86_64:
  "_ACAccountTypeIdentifierTwitter", referenced from:
      -[PF_Twitter getLocalTwitterAccountAsync] in Parse(PF_Twitter.o)
  "_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_$_ACAccountStore", referenced from:
      objc-class-ref in Parse(PF_Twitter.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_CLASS_$_SLComposeViewController", referenced from:
      objc-class-ref in Parse(PF_Twitter.o)
  "_OBJC_CLASS_$_SLRequest", referenced from:
      objc-class-ref in Parse(PF_Twitter.o)
  "_OBJC_METACLASS_$_FBSessionTokenCachingStrategy", referenced from:
      _OBJC_METACLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
  "_SLServiceTypeTwitter", referenced from:
      -[PF_Twitter getAccessTokenForReverseAuthAsync:localTwitterAccount:] in Parse(PF_Twitter.o)
      -[PF_Twitter getLocalTwitterAccountAsync] in Parse(PF_Twitter.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm using xcode 5.1.1 and the last available sdk from google. Is it some sort of conflict between parse and google sdks?


Solution

  • I think you need to add the Facebook SDK to your project.

    The Parse SDK conditionally references the Facebook SDK, so if you use the Facebook features in the Parse SDK, then you need to include the Facebook SDK so that the Parse SDK can call them. Normally, if you don't need to use the Facebook features in the Parse SDK, then you don't need to include the Facebook SDK.

    However, the -ObjC flag which you need to include for Google Maps causes the references in the Parse SDK to the Facebook SDK to be forced to be included. And so it fails to link because the Facebook SDK isn't there.