# SDK集成步骤

## 1. 在Xcode工程中开启特性支持

开启GameCenter支持, 如果开启失败, 请检查在`iTunes connect`中, app是否开启了GameCenter支持

![](https://1739852360-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAvkro3GBtTuJD_mcnW%2F-LB_Ge_xmZrUdx5xI7Qo%2F-LB_GjpZ-dzSVT50nn6S%2FGameCenter.png?generation=1525338801579200\&alt=media)

开启Keychain支持, 注意, 请正确填入包名到Keychain Groups中

![](https://1739852360-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAvkro3GBtTuJD_mcnW%2F-LB_Ge_xmZrUdx5xI7Qo%2F-LB_GjqHezpc9HPxMPlg%2FKeychain.png?generation=1525338818801621\&alt=media)

## 2. 在Build Phases中添加相关文件, 所需文件如下(在Demo中获取相关文件):

> Bolts.framework
>
> FBSDKCoreKit.framework
>
> FBSDKLoginKit.framework
>
> FBSDKShareKit.framework
>
> NGALoginSDK.framework
>
> FacebookSDKStrings.bundle
>
> NGALoginSDKResource.bundle
>
> NGALoginSDKStrings.bundle
>
> GameKit.framework (系统库)

然后将文件添加到`Build Phases`中如下图:

framework添加到 `Link Binary With Libraries` 中, bundle资源文件添加到 `Copy Bundle Resources`中:

![](https://1739852360-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAvkro3GBtTuJD_mcnW%2F-LB_Ge_xmZrUdx5xI7Qo%2F-LB_Gjs_yhufSktrOC9I%2FBuild.png?generation=1525338801646945\&alt=media)

## 3. 需要关注的Build Settings设置:

注意拼写为: **-ObjC**

![](https://1739852360-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAvkro3GBtTuJD_mcnW%2F-LB_Ge_xmZrUdx5xI7Qo%2F-LB_GjtO6EJinn7uZVf-%2FSnipaste_2018-05-03_11-50-51.png?generation=1525338817440926\&alt=media)

### 至此, 项目集成SDK完毕
