ios – 找不到Facebook.h.

前端之家收集整理的这篇文章主要介绍了ios – 找不到Facebook.h.前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正试图通过我离开亚马逊的Facebook SDK书籍.编码开始于 @H_403_2@#import“Facebook / Facebook.h” @H_403_2@你有几乎立即创建一个Facebook对象吗?我的SDK中似乎没有任何此文件.这本书已经过时了吗?它刚刚于去年秋天发布……

解决方法

以下是最新的,对我来说是一个很好的资源: Getting Started with the Facebook SDK

我使用以下导入来访问Facebook SDK:

#import <FacebookSDK/FacebookSDK.h>

您的环境似乎没有Facebook框架.下载那个here.

更新

我找到了官方Facebook的答案.显然,这些是不推荐使用的标题,仍可用于向后兼容性.

请注意,在底部,如果在完成以下步骤后Xcode在识别导入时出现问题,请重新启动XCode.

Add the headers by dragging the DeprecatedHeaders folder from the@H_403_2@ FacebookSDK.framework/Versions/A/DeprecatedHeaders folder into the@H_403_2@ Frameworks section of your Project Navigator.

Choose ‘Create groups for any added folders’ and deselect ‘Copy items@H_403_2@ into destination group’s folder (if needed)’. This adds the headers as@H_403_2@ a reference.

Now,open up your app delegate header file and replace the Facebook@H_403_2@ framework import with the Facebook header import.

Change:

#import <FacebookSDK/FacebookSDK.h>

To:

#import "Facebook.h"

This allows you to make call to the FBDialog classes. The Facebook.h@H_403_2@ header includes the@H_403_2@ header files.

Note: If you have any problems with Xcode recognizing the Facebook.h@H_403_2@ file,just close and reopen your Xcode project.

Source

猜你在找的iOS相关文章