Commit ca2f3a93591eed97f4c309cfde79de39052ffef8
1 parent
088dc87920
Exists in
master
增加vk配置项说明
Showing 1 changed file with 14 additions and 6 deletions Side-by-side Diff
doc/IOSDocument.md
| ... | ... | @@ -3,12 +3,12 @@ |
| 3 | 3 | |
| 4 | 4 | 接入手册 |
| 5 | 5 | V |
| 6 | -2015年08月07日 | |
| 6 | +2015年09月25日 | |
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | |
| 10 | 10 | ## 1、添加动态库 |
| 11 | -在工程里添加MobileCoreServices.framework、SystemConfiguration.framework、libz.dylib、CFNetwork.framework、libletsgame.a、StoreKit.framework | |
| 11 | +在工程里添加MobileCoreServices.framework、SystemConfiguration.framework、libz.dylib、CFNetwork.framework、libletsgame.a、StoreKit.framework、VKSdk.framework | |
| 12 | 12 | |
| 13 | 13 | |
| 14 | 14 | ## 2、设置头文件搜索路径 |
| ... | ... | @@ -16,13 +16,21 @@ V |
| 16 | 16 | |
| 17 | 17 | |
| 18 | 18 | ## 3、添加资源文件 |
| 19 | -在工程里添加letsgame.bundle资源文件,里面包含图片及相关语言包 | |
| 19 | +在工程里添加letsgame.bundle和VKSDKResources.bundle资源文件,里面包含图片及相关语言包 | |
| 20 | 20 | |
| 21 | +## 4、为vk增加必要配置 | |
| 22 | +1)在application delegate方法中, 在application:openURL:sourceApplication:annotation:添加返回: | |
| 21 | 23 | |
| 22 | -## 4、在工程里添加SDK登录代码 | |
| 24 | + return [[LetsGameAPI instance] handleOpenURL:url sourceApplication:sourceApplication]; | |
| 25 | + | |
| 26 | +2)配置URL-schema | |
| 27 | +Xcode 5: Open your application settings then select the Info tab. In the URL Types section click the plus sign. Enter vk+APP_ID (e.g. vk1234567) to the Identifier and URL Schemes fields. | |
| 28 | +Xcode 4: Open your Info.plist then add a new row URL Types. Set the URL identifier to vk+APP_ID | |
| 29 | +## 5、在工程里添加SDK登录代码 | |
| 23 | 30 | |
| 24 | 31 | [LetsGameAPI instance].appId = @"100"; // 设置appId |
| 25 | 32 | [LetsGameAPI instance].appKey = @"100"; // 设置appKey |
| 33 | + [LetsGameAPI instance].vkAppId = @"5029792"; //设置vkAppId | |
| 26 | 34 | |
| 27 | 35 | [[LetsGameAPI instance] showLoginView]; // 弹出登录页面 |
| 28 | 36 | |
| ... | ... | @@ -37,7 +45,7 @@ V |
| 37 | 45 | }; |
| 38 | 46 | |
| 39 | 47 | |
| 40 | -## 5、第三方支付 | |
| 48 | +## 6、第三方支付 | |
| 41 | 49 | [LetsGameAPI instance].appId = @"10022"; |
| 42 | 50 | [LetsGameAPI instance].appKey = @"f899139df5e1059396431415e770c6dd"; |
| 43 | 51 | NSMutableDictionary *payInfo = [NSMutableDictionary dictionary]; |
| ... | ... | @@ -48,7 +56,7 @@ V |
| 48 | 56 | [payInfo setValue:@"元宝" forKey:@"product"];//物品信息 |
| 49 | 57 | [[LetsGameAPI instance] pay:payInfo]; |
| 50 | 58 | |
| 51 | -## 6、IAP支付 | |
| 59 | +## 7、IAP支付 | |
| 52 | 60 | 若要使用apple IAP支付,需要在AppDelegate的application: didFinishLaunchingWithOptions:方法内注册iap observer,使用如下方法 |
| 53 | 61 | |
| 54 | 62 | [[LetsGameAPI instance] registeIapObserver]; |