在Swift中解析和GMaps iOS SDK不兼容? [英] Parse and GMaps iOS SDK incompatibility in Swift?
问题描述
我正在构建一个带有Parse集成的Swift应用程序,该应用程序可以正常运行.但是,当我尝试添加Google Maps iOS SDK集成时,出现以下构建错误:
I'm building a Swift app w/ Parse integration, which works correctly. When I try to add Google Maps iOS SDK integration, however, I get the following build errors:
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.framework
和Accounts.framework
,还添加了Parse
,Bolts
和ParseFacebookUtilsV4
.我删除了ParseFacebookUtils
. (我按照解析文档和答案的指示进行操作,例如此.)
In my project target, under Linked Frameworks and Libraries
, I have added Social.framework
and Accounts.framework
, as well as Parse
, Bolts
and ParseFacebookUtilsV4
added. I deleted ParseFacebookUtils
. (I followed directions per Parse docs and answers such as this.)
对于Google Maps iOS SDK,我在Other Linker Flags
中添加了-ObjC
,因为这是Swift兼容性所必需的.
For Google Maps iOS SDK, I added -ObjC
to Other Linker Flags
, since this is required for Swift compatibility.
这里的问题似乎是Parse和GMaps iOS SDK之间不兼容,因为-ObjC linker flag
会导致Parse构建错误,但如果没有它,GMaps将无法工作.我正在使用最新版本的Parse SDK和Google Maps iOS SDK.
The issue here seems to be incompatibility between Parse and GMaps iOS SDK, since the -ObjC linker flag
causes Parse build errors, but without it GMaps will not work. I am using the latest versions of Parse SDK and Google Maps iOS SDK.
有人成功将Parse和Google Maps iOS SDK集成到Swift应用程序中了吗?
Anyone successfully integrated both Parse AND Google Maps iOS SDK in a Swift app?
推荐答案
我也遇到了这个问题. 我添加了一些其他框架,请确保您拥有所有这些框架:
I had this problem too.. I added some further Frameworks, make shure you have all these:
在所有这些框架中,-ObjC Linker Flag
解析和gmaps应该一起工作.
With all these frameworks, and the -ObjC Linker Flag
parse and gmaps should work together.
这篇关于在Swift中解析和GMaps iOS SDK不兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!