Commit d7e540e1e8fd92d7734c32a7a40174fea0e99a14

Authored by alexYang
1 parent 524f882206
Exists in master

1、关闭页面接口增加2、关于游客登录绑定3、游客登录或者自动登录的时候绑定成gump用户alert出现4、IAP添加增加金额和金额种类5、web第三方登录时有时…

…出现bug6、password 加密过程中问题修改7、Google登录修改UA

Showing 17 changed files with 145 additions and 41 deletions Side-by-side Diff

... ... @@ -2,8 +2,8 @@
2 2  
3 3  
4 4 接入手册
5   -V 3.5.7
6   -2018年6月13日
  5 +V 3.5.18
  6 +2018年7月24日
7 7  
8 8 ## 概述
9 9 #### 本SDK提供gump账号,fb账号,vk账号,Google帐号四种账号登录,iap支付和第三方支付两种支付功能,其中gump账号登录和fb账号登录功能为必须接入,支付可根据需要选择性接入。
ios/GameActivitySDK.framework/Versions/A/GameActivitySDK
No preview for this file type
ios/GameActivitySDK.framework/Versions/A/Headers/LetsGameActivityAPI.h
... ... @@ -9,11 +9,13 @@
9 9 #import <Foundation/Foundation.h>
10 10 #import <UIKit/UIKit.h>
11 11  
12   -static NSString *actVersion = @"1.0.1";
  12 +static NSString *actVersion = @"1.0.2";
13 13  
14 14 @interface LetsGameActivityAPI : NSObject<UIApplicationDelegate>
15 15  
16 16 @property(nonatomic, assign) int isDebug;
  17 +@property(nonatomic, assign) int allowRotate;
  18 +@property(nonatomic, assign) BOOL supportLandscape;
17 19  
18 20 +(instancetype)instance;
19 21  
... ... @@ -21,6 +23,8 @@ static NSString *actVersion = @&quot;1.0.1&quot;;
21 23  
22 24 -(void)decideIsDebug:(int)isDebug;
23 25  
  26 +-(void)decideAllowRotate:(int)allowRotate;
  27 +
24 28 -(void)GameActivityWithParaDictory:(NSDictionary *)paraDictory handleCallBackL:(void(^)(void))accomplistCallBack;
25 29  
26 30 @end
ios/GameSDK.framework/Versions/A/GameSDK
No preview for this file type
ios/GameSDK.framework/Versions/A/Headers/LetsGameAPI.h
... ... @@ -22,7 +22,7 @@ static BOOL hiddenLogo = NO;
22 22 //默认横屏
23 23 static BOOL DeviceOrientationIsHorizontal = YES;
24 24  
25   -static NSString *version = @"3.5.7";
  25 +static NSString *version = @"3.5.18";
26 26  
27 27 @interface LetsGameAPI : NSObject<UIApplicationDelegate>
28 28  
... ... @@ -88,4 +88,6 @@ static NSString *version = @&quot;3.5.7&quot;;
88 88 -(void)gameObtainSafeSetInfoWithAppId:(NSString *)appId
89 89 ChannelId:(NSString *)channelId
90 90 handleCallBack:(void (^)(BOOL resultStatus))callBack;
  91 +//关闭登录页面
  92 +-(void)hidenLogInView;
91 93 @end
No preview for this file type
ios/GameSDKDemo/GameSDKDemo.xcodeproj/project.pbxproj
... ... @@ -30,6 +30,23 @@
30 30 997523321930A52600F50D29 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 997523311930A52600F50D29 /* MobileCoreServices.framework */; };
31 31 /* End PBXBuildFile section */
32 32  
  33 +/* Begin PBXContainerItemProxy section */
  34 + 75C5488520D0E55E002A6ABF /* PBXContainerItemProxy */ = {
  35 + isa = PBXContainerItemProxy;
  36 + containerPortal = 75C5488020D0E55E002A6ABF /* GameSDK.xcodeproj */;
  37 + proxyType = 2;
  38 + remoteGlobalIDString = 99626194192D9649004FF2E3;
  39 + remoteInfo = GameSDK;
  40 + };
  41 + 75C5488D20D0E585002A6ABF /* PBXContainerItemProxy */ = {
  42 + isa = PBXContainerItemProxy;
  43 + containerPortal = 75C5488820D0E584002A6ABF /* GameActivitySDK.xcodeproj */;
  44 + proxyType = 2;
  45 + remoteGlobalIDString = 752CAD5D20CE2AEE003C3840;
  46 + remoteInfo = GameActivitySDK;
  47 + };
  48 +/* End PBXContainerItemProxy section */
  49 +
33 50 /* Begin PBXFileReference section */
34 51 27019DCA1A208B1500DA560D /* Path.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Path.xcconfig; sourceTree = "<group>"; };
35 52 27019DCB1A208B1500DA560D /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Project.xcconfig; sourceTree = "<group>"; };
... ... @@ -46,6 +63,8 @@
46 63 75864D641FF35A3A002C9012 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
47 64 75864D661FF35A48002C9012 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
48 65 75864D681FF35A57002C9012 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
  66 + 75C5488020D0E55E002A6ABF /* GameSDK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GameSDK.xcodeproj; path = ../../../iosgamesdk/GameSDK/GameSDK.xcodeproj; sourceTree = "<group>"; };
  67 + 75C5488820D0E584002A6ABF /* GameActivitySDK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GameActivitySDK.xcodeproj; path = ../../../GameActivitySDK/GameActivitySDK.xcodeproj; sourceTree = "<group>"; };
49 68 9934F1AE19303DC6005EF4AB /* GameSDKDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GameSDKDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
50 69 9934F1B119303DC6005EF4AB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
51 70 9934F1B319303DC6005EF4AB /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
... ... @@ -100,10 +119,28 @@
100 119 27019DCE1A208B2300DA560D /* Dependencies */ = {
101 120 isa = PBXGroup;
102 121 children = (
  122 + 75C5488820D0E584002A6ABF /* GameActivitySDK.xcodeproj */,
  123 + 75C5488020D0E55E002A6ABF /* GameSDK.xcodeproj */,
103 124 );
104 125 name = Dependencies;
105 126 sourceTree = "<group>";
106 127 };
  128 + 75C5488120D0E55E002A6ABF /* Products */ = {
  129 + isa = PBXGroup;
  130 + children = (
  131 + 75C5488620D0E55E002A6ABF /* libGameSDK.a */,
  132 + );
  133 + name = Products;
  134 + sourceTree = "<group>";
  135 + };
  136 + 75C5488920D0E584002A6ABF /* Products */ = {
  137 + isa = PBXGroup;
  138 + children = (
  139 + 75C5488E20D0E585002A6ABF /* libGameActivitySDK.a */,
  140 + );
  141 + name = Products;
  142 + sourceTree = "<group>";
  143 + };
107 144 9934F1A519303DC6005EF4AB = {
108 145 isa = PBXGroup;
109 146 children = (
... ... @@ -221,6 +258,16 @@
221 258 mainGroup = 9934F1A519303DC6005EF4AB;
222 259 productRefGroup = 9934F1AF19303DC6005EF4AB /* Products */;
223 260 projectDirPath = "";
  261 + projectReferences = (
  262 + {
  263 + ProductGroup = 75C5488920D0E584002A6ABF /* Products */;
  264 + ProjectRef = 75C5488820D0E584002A6ABF /* GameActivitySDK.xcodeproj */;
  265 + },
  266 + {
  267 + ProductGroup = 75C5488120D0E55E002A6ABF /* Products */;
  268 + ProjectRef = 75C5488020D0E55E002A6ABF /* GameSDK.xcodeproj */;
  269 + },
  270 + );
224 271 projectRoot = "";
225 272 targets = (
226 273 9934F1AD19303DC6005EF4AB /* GameSDKDemo */,
... ... @@ -228,6 +275,23 @@
228 275 };
229 276 /* End PBXProject section */
230 277  
  278 +/* Begin PBXReferenceProxy section */
  279 + 75C5488620D0E55E002A6ABF /* libGameSDK.a */ = {
  280 + isa = PBXReferenceProxy;
  281 + fileType = archive.ar;
  282 + path = libGameSDK.a;
  283 + remoteRef = 75C5488520D0E55E002A6ABF /* PBXContainerItemProxy */;
  284 + sourceTree = BUILT_PRODUCTS_DIR;
  285 + };
  286 + 75C5488E20D0E585002A6ABF /* libGameActivitySDK.a */ = {
  287 + isa = PBXReferenceProxy;
  288 + fileType = archive.ar;
  289 + path = libGameActivitySDK.a;
  290 + remoteRef = 75C5488D20D0E585002A6ABF /* PBXContainerItemProxy */;
  291 + sourceTree = BUILT_PRODUCTS_DIR;
  292 + };
  293 +/* End PBXReferenceProxy section */
  294 +
231 295 /* Begin PBXResourcesBuildPhase section */
232 296 9934F1AC19303DC6005EF4AB /* Resources */ = {
233 297 isa = PBXResourcesBuildPhase;
ios/GameSDKDemo/GameSDKDemo.xcodeproj/project.xcworkspace/xcuserdata/yanglele.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
ios/GameSDKDemo/GameSDKDemo.xcodeproj/xcuserdata/yanglele.xcuserdatad/xcschemes/GameSDKDemo.xcscheme
... ... @@ -68,7 +68,7 @@
68 68 <EnvironmentVariable
69 69 key = "OS_ACTIVITY_MODE"
70 70 value = "disable"
71   - isEnabled = "YES">
  71 + isEnabled = "NO">
72 72 </EnvironmentVariable>
73 73 </EnvironmentVariables>
74 74 <AdditionalOptions>
ios/GameSDKDemo/letsgameDemo/LSGAppDelegate.m
... ... @@ -9,13 +9,14 @@
9 9 #import "LSGAppDelegate.h"
10 10 #import "LSGMainViewController.h"
11 11 #import "LetsGameAPI.h"
  12 +#import "LetsGameActivityAPI.h"
12 13  
13 14 @implementation LSGAppDelegate
14 15  
15 16 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
16 17 {
17 18 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
18   - [LetsGameAPI DeviceOrientationIsHorizontal:NO];
  19 +// [LetsGameAPI DeviceOrientationIsHorizontal:NO];
19 20  
20 21 LSGMainViewController *viewController = [[LSGMainViewController alloc] init];
21 22 self.window.rootViewController = viewController;
... ... @@ -24,7 +25,7 @@
24 25 self.window.backgroundColor = [UIColor whiteColor];
25 26 [self.window makeKeyAndVisible];
26 27  
27   - [[LetsGameAPI instance] decideIsDebug:1];
  28 +// [[LetsGameAPI instance] decideIsDebug:1];
28 29 [[LetsGameAPI instance] decideWebToVersion:1];
29 30  
30 31 //显示是否侵权的接口
... ... @@ -37,11 +38,11 @@
37 38 }];
38 39  
39 40 //微信登陆
40   - [[LetsGameAPI instance] registerAppWeChatWithAppId:@"100" appKey:@"f899139df5e1059396431415e770c6dd" Success:^{
41   - NSLog(@"注册成功");
42   - } failure:^{
43   - NSLog(@"注册失败");
44   - }];
  41 +// [[LetsGameAPI instance] registerAppWeChatWithAppId:@"100" appKey:@"f899139df5e1059396431415e770c6dd" Success:^{
  42 +// NSLog(@"注册成功");
  43 +// } failure:^{
  44 +// NSLog(@"注册失败");
  45 +// }];
45 46  
46 47 [[UIApplication sharedApplication] setStatusBarHidden:YES];
47 48 [[LetsGameAPI instance] registeIapObserver];
... ... @@ -71,5 +72,12 @@
71 72 //return [[LetsGameAPI instance].vkBridge processOpenURL:url fromApplication:sourceApplication];
72 73 }
73 74  
  75 +//-(UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{
  76 +// if([LetsGameActivityAPI instance].supportLandscape == YES){
  77 +// return UIInterfaceOrientationMaskPortrait;
  78 +// }else{
  79 +// return UIInterfaceOrientationMaskLandscape;
  80 +// }
  81 +//}
74 82  
75 83 @end
ios/GameSDKDemo/letsgameDemo/LSGMainViewController.h
... ... @@ -9,5 +9,4 @@
9 9 #import <UIKit/UIKit.h>
10 10  
11 11 @interface LSGMainViewController : UIViewController
12   -
13 12 @end
ios/GameSDKDemo/letsgameDemo/LSGMainViewController.m
... ... @@ -91,9 +91,9 @@
91 91  
92 92 - (void)onClickTest {
93 93  
94   - [LetsGameAPI instance].appId = @"10103";//10047
95   - [LetsGameAPI instance].appKey = @"f53eb4122d5e2ce81a12093f8f9ce922";//eccd9f7dc92858b741132fda313130cf
96   - [LetsGameAPI instance].channelId = @"1002";
  94 + [LetsGameAPI instance].appId = @"10105";//@"100";//10047
  95 + [LetsGameAPI instance].appKey = @"4c0a7bdd46ceb88d497eec5de360328e";//@"f899139df5e1059396431415e770c6dd";//eccd9f7dc92858b741132fda313130cf
  96 + [LetsGameAPI instance].channelId = @"1000";
97 97 [LetsGameAPI hiddenLogo:YES];
98 98 // [LetsGameAPI disableFB:YES];
99 99 // [LetsGameAPI disableGoogle:YES];
... ... @@ -134,33 +134,53 @@
134 134 [payInfo setValue:@"ios demo" forKey:@"extraInfo"];
135 135 [payInfo setValue:@"wa2" forKey:@"product"];
136 136 [payInfo setValue:@"78b83666bd77c1e4c95442140672254d" forKey:@"sessionKey"]; //self.sessionKey
  137 +// [[LetsGameAPI instance] pay:payInfo handleCallBack:^{
  138 +// NSLog(@"第三方支付完成");
  139 +// }];
137 140 [[LetsGameAPI instance] pWeb:payInfo handleCallBack:^{
138 141 NSLog(@"第三方支付完成");
139 142 }];
140 143 }
141 144  
142 145 -(void)onIapTest{
143   - [LetsGameAPI instance].appId = @"10056";
144   - [LetsGameAPI instance].appKey = @"b59c21a078fde074a6750e91ed19fb21";
  146 + [LetsGameAPI instance].appId = @"10105";
  147 + [LetsGameAPI instance].appKey = @"4c0a7bdd46ceb88d497eec5de360328e";
145 148 NSMutableDictionary *payInfo = [NSMutableDictionary dictionary];
146   - [payInfo setValue:@"5001" forKey:@"serverId"];
147   - [payInfo setValue:@"10010" forKey:@"roleId"];
  149 + [payInfo setValue:@"1" forKey:@"serverId"];
  150 + [payInfo setValue:@"1000039" forKey:@"roleId"];
148 151 [payInfo setValue:@"1000" forKey:@"channelId"];
149   - [payInfo setValue:@"10" forKey:@"amount"];
150   - [payInfo setValue:@"ios demo" forKey:@"extraInfo"];
151   - [payInfo setValue:@"test.product.1" forKey:@"product"];
  152 + [payInfo setValue:@"0.99" forKey:@"amount"];
  153 + [payInfo setValue:@"001QwnfQym0H" forKey:@"extraInfo"];
  154 + [payInfo setValue:@"com.dig.wo.xia.99" forKey:@"product"];
152 155 [[LetsGameAPI instance] iap:payInfo forUser:@"" succCallback:^(NSString *orderId) {
153 156 //注意测试仅仅是通知客户端成功,但是还需要向服务器请求验证是否成功,以服务端验证为准
154 157 NSLog(@"IAP completed orderId of Gumptech:%@",orderId);
155 158 } failCallback:^(NSString *orderId) {
156 159 NSLog(@"IAP file orderId of Gumptech:%@",orderId);
157 160 }];
  161 +
  162 +// [LetsGameAPI instance].appId = @"10056";
  163 +// [LetsGameAPI instance].appKey = @"b59c21a078fde074a6750e91ed19fb21";
  164 +// NSMutableDictionary *payInfo = [NSMutableDictionary dictionary];
  165 +// [payInfo setValue:@"5001" forKey:@"serverId"];
  166 +// [payInfo setValue:@"10010" forKey:@"roleId"];
  167 +// [payInfo setValue:@"1000" forKey:@"channelId"];
  168 +// [payInfo setValue:@"10" forKey:@"amount"];
  169 +// [payInfo setValue:@"ios demo" forKey:@"extraInfo"];
  170 +// [payInfo setValue:@"test.product.1" forKey:@"product"];
  171 +// [[LetsGameAPI instance] iap:payInfo forUser:@"" succCallback:^(NSString *orderId) {
  172 +// //注意测试仅仅是通知客户端成功,但是还需要向服务器请求验证是否成功,以服务端验证为准
  173 +// NSLog(@"IAP completed orderId of Gumptech:%@",orderId);
  174 +// } failCallback:^(NSString *orderId) {
  175 +// NSLog(@"IAP file orderId of Gumptech:%@",orderId);
  176 +// }];
158 177 }
159 178  
160 179 -(void)onActivity{
161 180  
162 181 [[LetsGameActivityAPI instance] decideIsDebug:1];
163   -
  182 +// [LetsGameActivityAPI instance].supportLandscape = YES;
  183 +// [[LetsGameActivityAPI instance] decideAllowRotate:1];
164 184 NSMutableDictionary *activityInfo = [NSMutableDictionary dictionary];
165 185 [activityInfo setValue:@"100" forKey:@"appId"];
166 186 [activityInfo setValue:@"f899139df5e1059396431415e770c6dd" forKey:@"appKey"];
... ... @@ -176,16 +196,5 @@
176 196 }
177 197  
178 198  
179   -- (BOOL)shouldAutorotate {
180   - return YES;
181   -}
182   -
183   --(UIInterfaceOrientationMask)supportedInterfaceOrientations{
184   - return UIInterfaceOrientationMaskAll;
185   -}
186   -
187   -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
188   - return YES;
189   -}
190 199  
191 200 @end
ios/GameSDKDemo/letsgameDemo/letsgameDemo-Info.plist
... ... @@ -2,11 +2,6 @@
2 2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 3 <plist version="1.0">
4 4 <dict>
5   - <key>NSAppTransportSecurity</key>
6   - <dict>
7   - <key>NSAllowsArbitraryLoads</key>
8   - <true/>
9   - </dict>
10 5 <key>CFBundleDevelopmentRegion</key>
11 6 <string>en</string>
12 7 <key>CFBundleDisplayName</key>
... ... @@ -64,6 +59,11 @@ ${PRODUCT_NAME}&lt;/string&gt;
64 59 </array>
65 60 <key>LSRequiresIPhoneOS</key>
66 61 <true/>
  62 + <key>NSAppTransportSecurity</key>
  63 + <dict>
  64 + <key>NSAllowsArbitraryLoads</key>
  65 + <true/>
  66 + </dict>
67 67 <key>UIRequiredDeviceCapabilities</key>
68 68 <array>
69 69 <string>armv7</string>
... ... @@ -72,9 +72,9 @@ ${PRODUCT_NAME}&lt;/string&gt;
72 72 <true/>
73 73 <key>UISupportedInterfaceOrientations</key>
74 74 <array>
75   - <string>UIInterfaceOrientationPortrait</string>
76 75 <string>UIInterfaceOrientationLandscapeLeft</string>
77 76 <string>UIInterfaceOrientationLandscapeRight</string>
  77 + <string>UIInterfaceOrientationPortrait</string>
78 78 </array>
79 79 </dict>
80 80 </plist>
ios/GameSDKResources.bundle/en.strings
... ... @@ -34,3 +34,8 @@
34 34 "Confirm_password" = "Confirm";
35 35 "input_new_pwd" = "Please input new password";
36 36 "back" = "Back";
  37 +"play_btn_notice" = "Your current account is GUEST. Please registrate email & password to better secure your account and avoid data loss. All your guest info will be moved to the new account.";
  38 +"Notice" = "Warning";
  39 +"Continue" = "Continue";
  40 +"Log_in" = "sign up";
  41 +
ios/GameSDKResources.bundle/th.strings
... ... @@ -31,3 +31,7 @@
31 31 "Confirm_password" = "ยืนยันรหัสผ่าน";
32 32 "input_new_pwd" = "กรุณากรอกรหัสผ่านใหม่";
33 33 "back" = "ย้อนกลับ";
  34 +"play_btn_notice" = "เพื่อความปลอดภัยของIDที่ล็อกอินแบบGuestกรุณากดสมัครบัญชีและดำเนินการให้สำเร็จข้อมูลในIDแบบGuestของท่านจะย้ายไปยังIDใหม่โดยอัตโนมัติ";
  35 +"Notice" = "คำเตือน";
  36 +"Continue" = "ล็อกอินต่อไป";
  37 +"Log_in" = "สมัคร";
ios/GameSDKResources.bundle/zh-Hans.strings
... ... @@ -35,3 +35,8 @@
35 35 "forget_change_password" = "修改/忘记密码?";
36 36 "input_new_pwd" = "请输入新密码";
37 37 "back" = "返回";
  38 +"play_btn_notice" = "您登录了游客用户,为了账户安全,避免数据丢失。请点击注册账号完成注册。游客信息将自动转移至新帐号。";
  39 +"Notice" = "提示";
  40 +"Continue" = "繼續登錄";
  41 +"Log_in" = "註冊帳號";
  42 +
ios/GameSDKResources.bundle/zh-Hant.strings
... ... @@ -34,3 +34,7 @@
34 34 "forget_change_password" = "修改/忘記密碼";
35 35 "input_new_pwd" = "請輸入新密碼";
36 36 "back" = "返回";
  37 +"play_btn_notice" = "您登錄了遊客帳戶。為了您的帳號安全,避免數據丟失,請點擊註冊帳號完成註冊。遊客信息將自動轉移至新帳號。";
  38 +"Notice" = "提示";
  39 +"Continue" = "继续登录";
  40 +"Log_in" = "注册账号";