Swift 中的解析和 GMaps iOS SDK 不兼容?

Parse and GMaps iOS SDK incompatibility in Swift?

我正在构建一个 Swift 带有 Parse 集成的应用程序,它可以正常工作。但是,当我尝试添加 Google Maps iOS SDK 集成时,出现以下构建错误:

Undefined symbols for architecture x86_64:
"_FBTokenInformationExpirationDateKey", referenced from:
  -[PFFacebookTokenCachingStrategy cacheTokenInformation:] in  ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
  -[PFFacebookTokenCachingStrategy expirationDate] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
  -[PFFacebookTokenCachingStrategy setExpirationDate:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
 "_FBTokenInformationTokenKey", referenced from:
  -[PFFacebookTokenCachingStrategy accessToken] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
  -[PFFacebookTokenCachingStrategy setAccessToken:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationUserFBIDKey", referenced from:
  -[PFFacebookTokenCachingStrategy facebookId] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
  -[PFFacebookTokenCachingStrategy setFacebookId:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_OBJC_CLASS_$_FBAppCall", referenced from:
  objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
"_OBJC_CLASS_$_FBRequest", referenced from:
  objc-class-ref in   ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
"_OBJC_CLASS_$_FBSDKAccessToken", referenced from:
  objc-class-ref in ParseFacebookUtilsV4(PFFacebookUtils.o)
  objc-class-ref in ParseFacebookUtilsV4(PFFacebookAuthenticationProvider.o)
   "_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from:
  objc-class-ref in ParseFacebookUtilsV4(PFFacebookUtils.o)
"_OBJC_CLASS_$_FBSDKLoginManager", referenced from:
  objc-class-ref in  ParseFacebookUtilsV4(PFFacebookAuthenticationProvider.o)
   "_OBJC_CLASS_$_FBSDKSettings", referenced from:
  objc-class-ref in ParseFacebookUtilsV4(PFFacebookAuthenticationProvider.o)
  "_OBJC_CLASS_$_FBSession", referenced from:
  objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
 "_OBJC_CLASS_$_FBSessionTokenCachingStrategy", referenced from:
  _OBJC_CLASS_$_PFFacebookTokenCachingStrategy in          ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_OBJC_METACLASS_$_FBSessionTokenCachingStrategy", referenced from:
  _OBJC_METACLASS_$_PFFacebookTokenCachingStrategy in 

....
    google_breakpadPFC_::MinidumpGenerator::UniqueNameInDirectory(std::string const&, std::string*) in ParseCrashReporting(minidump_generator.o)
 ld: symbol(s) not found for architecture x86_64
 clang: error: linker command failed with exit code 1 (use -v to see invocation)

在我的项目目标中,在Linked Frameworks and Libraries下,我添加了Social.frameworkAccounts.framework,以及ParseBolts和[=18] =] 添加。我删除了ParseFacebookUtils。 (我遵循了 Parse 文档的指示和答案,例如 this。)

对于 Google Maps iOS SDK,我将 -ObjC 添加到 Other Linker Flags,因为这是 Swift 兼容性所必需的。

这里的问题似乎是 Parse 和 GMaps iOS SDK 之间的不兼容,因为 -ObjC linker flag 导致 Parse 构建错误,但没有它 GMaps 将无法工作。我使用的是最新版本的 Parse SDK 和 Google Maps iOS SDK。

有人在 Swift 应用程序中成功集成了 Parse 和 Google Maps iOS SDK 吗?

我也有这个问题.. 我添加了一些进一步的框架,确保你拥有所有这些:

有了所有这些框架,-ObjC Linker Flag 解析和 gmap 应该一起工作。