我是 iOS 中 Facebook SDK 的新手。为什么我在构建项目时收到此错误...
我刚刚使用 Facebook SDK 的 ios 教程中的基本步骤创建了一个新项目。
- 下载 Facebook SDK(我用的是 3.1.1)
- Xcode(我使用 4.5.2)
- 添加“-lsqlite3.0
Other Linker Flags
”Build Setting
- 添加 FacebookSDK.framework
- 添加 FacebookSDKResources.bundle
- 添加 FBUserSettingsViewResources.bundle
我尝试构建,一切都好..所以我继续在 AppDelegate 上编写基本实现
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
return [FBSession.activeSession handleOpenURL:url];
}
和
#import <FacebookSDK/FacebookSDK.h>
当我尝试构建时,出现错误...这是日志
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_ACAccountStore", referenced from:
objc-class-ref in FacebookSDK(FBSession.o)
"_ACFacebookAudienceFriends", referenced from:
-[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
"_ACFacebookAppIdKey", referenced from:
-[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
"_ACAccountTypeIdentifierFacebook", referenced from:
+[FBSession renewSystemAuthorization] 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)
"_ACFacebookAudienceEveryone", referenced from:
-[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我发现这很奇怪,因为我使用与示例相同的 SDK 和相同的设置Scrumptious
,并且示例运行良好.. 同时我得到了这个错误......
任何想法?