我是iOS版Facebook SDK新手。 为什么我在构建项目时遇到此错误...
我只需从Facebook SDK的ios教程中创建一个基本步骤的新项目。
Other Linker Flags
Build Setting
中添加“-lsqlite3.0”
我尝试构建,一切正常..所以我继续在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)
我发现这很奇怪,因为我使用与Scrumptious
示例相同的SDK和相同的设置,并且示例运行良好..同时我收到此错误...
任何想法?
答案 0 :(得分:23)
我得到了答案... Facebook IOS SDK 3.1需要更多框架才能使用.. 需要&#39;帐户&#39; Ad&#39; AdSupport&#39;和&#39;社交&#39; IOS6上提供的框架。因为Facebook SDK 3.1
是基于IOS6
..
注意:如果您希望自己的应用也为旧版本的操作系统构建,则应使用可选标志用于特定于iOS6的框架。它看起来像这样。