Facebook IOS SDK 3.1.1 与 Xcode 4.5.2 错误

编程入门 行业动态 更新时间:2024-10-28 16:20:47
本文介绍了Facebook IOS SDK 3.1.1 与 Xcode 4.5.2 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我是 iOS 中 Facebook SDK 的新手.为什么我在构建项目时收到此错误...

I am new with Facebook SDK in iOS. Why I am get this error while build the project...

我刚刚使用 Facebook SDK 的 ios 教程中的基本步骤创建了一个新项目.

I Just create a new project with basic step from ios tutorial for Facebook SDK..

  • 下载 Facebook SDK(我用的是 3.1.1)
  • Xcode(我用的是 4.5.2)
  • 在 Build Setting
  • 的 Other Linker Flags 中添加-lsqlite3.0"
  • 添加 FacebookSDK.framework
  • 添加 FacebookSDKResources.bundle
  • 添加 FBUserSettingsViewResources.bundle
  • Download Facebook SDK (I use 3.1.1)
  • Xcode (I use 4.5.2)
  • adding "-lsqlite3.0" in Other Linker Flags on Build Setting
  • adding FacebookSDK.framework
  • adding FacebookSDKResources.bundle
  • adding FBUserSettingsViewResources.bundle

我尝试构建,一切正常.. 所以我继续在 AppDelegate 上编写基本实现

and I try build, everything ok.. so I continue to write the basic implementation on AppDelegate

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return [FBSession.activeSession handleOpenURL:url]; }

#import <FacebookSDK/FacebookSDK.h>

当我尝试构建时,出现错误...这是日志

When I try to build, error is coming out... This is the log

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 和相同的设置,并且该示例运行良好.. 同时我收到此错误...

I found this is weird, because I use the same SDK and the same setting with the Scrumptious example, And the example is running well.. Meanwhile I got this error...

有什么想法吗?

推荐答案

我得到了答案... Facebook IOS SDK 3.1 需要更多的框架来使用.. 它REQUIRE 'Accounts', 'AdSupport' 和 'Social' 框架在 IOS6 上可用.因为Facebook SDK 3.1是基于IOS6..

I got the answer... Facebook IOS SDK 3.1 need more framework to work with.. It REQUIRE 'Accounts', 'AdSupport' and 'Social' frameworks which is available on IOS6. Because Facebook SDK 3.1 is created based on IOS6..

注意:如果您希望您的应用也为旧版本的操作系统构建,您应该为 iOS6 特定的框架使用 OPTIONAL 标志.看起来像这样.

Note: You should use the OPTIONAL flag for iOS6-specific frameworks if you would like your app to also build for older versions of the operating systems. It looks like this.

更多推荐

Facebook IOS SDK 3.1.1 与 Xcode 4.5.2 错误

本文发布于:2023-11-26 22:38:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1635488.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   SDK   IOS   Facebook   Xcode

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!