我刚刚将我项目中的 Facebook iOS SDK 从 3.0 更新到 3.1。该项目不再编译。相反,我收到以下链接器错误:
Undefined symbols for architecture i386:
"_ACFacebookAppIdKey", referenced from:
-[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
"_ACFacebookAudienceEveryone", referenced from:
-[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
"_ACFacebookAudienceFriends", referenced from:
-[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
"_ACFacebookAudienceKey", referenced from:
-[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
"_ACFacebookAudienceOnlyMe", referenced from:
-[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
"_ACFacebookPermissionsKey", referenced from:
-[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in FacebookSDK(FBSettings.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Facebook 文档清楚地说:
SDK 依赖于其他三个框架(AdSupport、Accounts 和 Social)来使用 iOS6 中内置的 Facebook 功能。
Xcode 4.2 中不存在这些框架。是否有任何解决方法,即我可以下载(在哪里?)并将框架手动添加到我的项目中,这足以消除编译错误还是我必须升级到 Xcode 4.5?