具有Xcode 4.5.2错误的Facebook IOS SDK 3.1.1

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

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

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

我只是从iOS教程的Facebook SDK的基本步骤中创建了一个新项目.

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需要使用更多框架..需要'Accounts',' IOS6上提供了"AdSupport"和社交"框架.因为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.

更多推荐

具有Xcode 4.5.2错误的Facebook IOS SDK 3.1.1

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

发布评论

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

>www.elefans.com

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