From ca2f3a93591eed97f4c309cfde79de39052ffef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BA=B7?= Date: Fri, 25 Sep 2015 15:58:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0vk=E9=85=8D=E7=BD=AE=E9=A1=B9?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/IOSDocument.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/doc/IOSDocument.md b/doc/IOSDocument.md index 05c38ef..f356df9 100644 --- a/doc/IOSDocument.md +++ b/doc/IOSDocument.md @@ -3,12 +3,12 @@ 接入手册 V -2015年08月07日 +2015年09月25日 ## 1、添加动态库 -在工程里添加MobileCoreServices.framework、SystemConfiguration.framework、libz.dylib、CFNetwork.framework、libletsgame.a、StoreKit.framework +在工程里添加MobileCoreServices.framework、SystemConfiguration.framework、libz.dylib、CFNetwork.framework、libletsgame.a、StoreKit.framework、VKSdk.framework ## 2、设置头文件搜索路径 @@ -16,13 +16,21 @@ V ## 3、添加资源文件 -在工程里添加letsgame.bundle资源文件,里面包含图片及相关语言包 +在工程里添加letsgame.bundle和VKSDKResources.bundle资源文件,里面包含图片及相关语言包 +## 4、为vk增加必要配置 +1)在application delegate方法中, 在application:openURL:sourceApplication:annotation:添加返回: -## 4、在工程里添加SDK登录代码 + return [[LetsGameAPI instance] handleOpenURL:url sourceApplication:sourceApplication]; + +2)配置URL-schema +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. +Xcode 4: Open your Info.plist then add a new row URL Types. Set the URL identifier to vk+APP_ID +## 5、在工程里添加SDK登录代码 [LetsGameAPI instance].appId = @"100"; // 设置appId [LetsGameAPI instance].appKey = @"100"; // 设置appKey + [LetsGameAPI instance].vkAppId = @"5029792"; //设置vkAppId [[LetsGameAPI instance] showLoginView]; // 弹出登录页面 @@ -37,7 +45,7 @@ V }; -## 5、第三方支付 +## 6、第三方支付 [LetsGameAPI instance].appId = @"10022"; [LetsGameAPI instance].appKey = @"f899139df5e1059396431415e770c6dd"; NSMutableDictionary *payInfo = [NSMutableDictionary dictionary]; @@ -48,7 +56,7 @@ V [payInfo setValue:@"元宝" forKey:@"product"];//物品信息 [[LetsGameAPI instance] pay:payInfo]; -## 6、IAP支付 +## 7、IAP支付 若要使用apple IAP支付,需要在AppDelegate的application: didFinishLaunchingWithOptions:方法内注册iap observer,使用如下方法 [[LetsGameAPI instance] registeIapObserver]; -- 2.0.0