Commit 0c287634f8bf76537a83232044e25dcafe283e89

Authored by alexYang
1 parent 9c29137767
Exists in master

同步更新版本至老域名

Showing 23 changed files with 93 additions and 83 deletions Inline Diff

1 # Gump IOS SDK使用文档 1 # Gump IOS SDK使用文档
2 2
3 3
4 接入手册 4 接入手册
5 V 3.5.3 5 V 3.4.14
6 2017年6月14日 6 2018年2月1日
7 7
8 ## 概述 8 ## 概述
9 #### 本SDK提供gump账号,fb账号,vk账号,Google帐号四种账号登录,iap支付和第三方支付两种支付功能,其中gump账号登录和fb账号登录功能为必须接入,支付可根据需要选择性接入。 9 #### 本SDK提供gump账号,fb账号,vk账号,Google帐号四种账号登录,iap支付和第三方支付两种支付功能,其中gump账号登录和fb账号登录功能为必须接入,支付可根据需要选择性接入。
10 10
11 ## 接入步骤 11 ## 接入步骤
12 ### 1、添加Framework和资源文件 12 ### 1、添加Framework和资源文件
13 + 以下为必须添加的framework以及资源bundle: 13 + 以下为必须添加的framework以及资源bundle:
14 MobileCoreServices.framework、SystemConfiguration.framework、libz.dylib、CFNetwork.framework、GameSDK.framework、StoreKit.framework、GameSDKResources.bundle 14 MobileCoreServices.framework、SystemConfiguration.framework、libz.dylib、CFNetwork.framework、GameSDK.framework、StoreKit.framework、GameSDKResources.bundle
15 + 以下为可选,若接入vk登录则需要添加以下framework和bundle,其中VKSdk.framework和VKSDKResources.bundle请自行从vk.com下载,使用1.3版本 15 + 以下为可选,若接入vk登录则需要添加以下framework和bundle,其中VKSdk.framework和VKSDKResources.bundle请自行从vk.com下载,使用1.3版本
16 VKSdk.framework、VKBridge.framework、VKSDKResources.bundle 16 VKSdk.framework、VKBridge.framework、VKSDKResources.bundle
17 17
18 18
19 ### 2、引入头文件,设置build setting 19 ### 2、引入头文件,设置build setting
20 需要使用头文件有LetsGameAPI.h和VKBridge.h,其中VKBridge.h为接入vk时使用,不接入vk可忽略。 20 需要使用头文件有LetsGameAPI.h和VKBridge.h,其中VKBridge.h为接入vk时使用,不接入vk可忽略。
21 因sdk内使用了category,需要设置other linker flag为 -ObjC 21 因sdk内使用了category,需要设置other linker flag为 -ObjC
22 22
23 23
24 ### 3、增加必要配置 24 ### 3、增加必要配置
25 1)在application delegate中, 在application:openURL:sourceApplication:annotation:添加返回: 25 1)在application delegate中, 在application:openURL:sourceApplication:annotation:添加返回:
26 26
27 return [[LetsGameAPI instance] handleOpenURL:url sourceApplication:sourceApplication]; 27 return [[LetsGameAPI instance] handleOpenURL:url sourceApplication:sourceApplication];
28 28
29 29
30 2)配置URL-schema(vk专用,不接入vk可忽略) 30 2)配置URL-schema(vk专用,不接入vk可忽略)
31 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. 31 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.
32 ![](images/vk1.jpg) 32 ![](images/vk1.jpg)
33 Xcode 4: Open your Info.plist then add a new row URL Types. Set the URL identifier to vk+APP_ID 33 Xcode 4: Open your Info.plist then add a new row URL Types. Set the URL identifier to vk+APP_ID
34 ![](images/vk2.jpg) 34 ![](images/vk2.jpg)
35 35
36 ### 4、在工程里添加SDK登录代码 36 ### 4、在工程里添加SDK登录代码
37 37
38 [LetsGameAPI instance].appId = @"100"; // 设置appId 38 [LetsGameAPI instance].appId = @"100"; // 设置appId
39 [LetsGameAPI instance].appKey = @"100"; // 设置appKey 39 [LetsGameAPI instance].appKey = @"100"; // 设置appKey
40 40
41 //启用vk的代码,需要填入vk appId,若不接入vk,可以忽略 41 //启用vk的代码,需要填入vk appId,若不接入vk,可以忽略
42 //VKBridge *vkBridge = [[VKBridge alloc] initWithVKAppId:@"5029792"]; 42 //VKBridge *vkBridge = [[VKBridge alloc] initWithVKAppId:@"5029792"];
43 //[LetsGameAPI instance].vkBridge = vkBridge; 43 //[LetsGameAPI instance].vkBridge = vkBridge;
44 44
45 //隐藏fb登录 45 //隐藏fb登录
46 [LetsGameAPI disableFB:YES]; 46 [LetsGameAPI disableFB:YES];
47 //隐藏Google登录 47 //隐藏Google登录
48 [LetsGameAPI disableGoogle:YES]; 48 [LetsGameAPI disableGoogle:YES];
49 //隐藏gumptech的logo 49 //隐藏gumptech的logo
50 [LetsGameAPI hiddenLogo:YES]; 50 [LetsGameAPI hiddenLogo:YES];
51 51
52 [[LetsGameAPI instance] showLoginView]; // 弹出登录页面 52 [[LetsGameAPI instance] showLoginView]; // 弹出登录页面
53 53
54 // 登录成功回调 54 // 登录成功回调
55 [LetsGameAPI instance].succBlock = ^(NSString *userId, NSString *sessionKey, LSGAccountType type) { 55 [LetsGameAPI instance].succBlock = ^(NSString *userId, NSString *sessionKey, LSGAccountType type) {
56 NSLog(@"%@", [NSString stringWithFormat:@"login succ: userId = %@, sessionKey = %@, accountType = %d", userId, sessionKey, type]); 56 NSLog(@"%@", [NSString stringWithFormat:@"login succ: userId = %@, sessionKey = %@, accountType = %d", userId, sessionKey, type]);
57 }; 57 };
58 58
59 // 登录失败回调 59 // 登录失败回调
60 [LetsGameAPI instance].dismissBlock = ^() { 60 [LetsGameAPI instance].dismissBlock = ^() {
61 NSLog(@"dismiss without login"); 61 NSLog(@"dismiss without login");
62 }; 62 };
63 63
64 ### 5、登录注销 64 ### 5、登录注销
65 注销接口只要设置过appId和appKey之后就不需要设置了,注销完成之后会回到登录界面。FB登录回到登录页面,Gump登录或者游客登录回到登录框。 65 注销接口只要设置过appId和appKey之后就不需要设置了,注销完成之后会回到登录界面。FB登录回到登录页面,Gump登录或者游客登录回到登录框。
66 66
67 [LetsGameAPI instance].appId = @"100";//设置appId 67 [LetsGameAPI instance].appId = @"100";//设置appId
68 [LetsGameAPI instance].appKey = @"100";//设置appkey 68 [LetsGameAPI instance].appKey = @"100";//设置appkey
69 [[LetsGameAPI instance] logout]; //注销 69 [[LetsGameAPI instance] logout]; //注销
70 70
71 71
72 ### 6、第三方支付 72 ### 6、第三方支付
73 [LetsGameAPI instance].appId = @"10022"; 73 [LetsGameAPI instance].appId = @"10022";
74 [LetsGameAPI instance].appKey = @"f899139df5e1059396431415e770c6dd"; 74 [LetsGameAPI instance].appKey = @"f899139df5e1059396431415e770c6dd";
75 NSMutableDictionary *payInfo = [NSMutableDictionary dictionary]; 75 NSMutableDictionary *payInfo = [NSMutableDictionary dictionary];
76 [payInfo setValue:@"5001" forKey:@"serverId"];//服务器id,必传参数 76 [payInfo setValue:@"5001" forKey:@"serverId"];//服务器id,必传参数
77 [payInfo setValue:@"10010" forKey:@"roleId"];//用户角色id 77 [payInfo setValue:@"10010" forKey:@"roleId"];//用户角色id
78 [payInfo setValue:@"1000" forKey:@"channelId"];//渠道id 78 [payInfo setValue:@"1000" forKey:@"channelId"];//渠道id
79 [payInfo setValue:@"10" forKey:@"amount"];//金额 79 [payInfo setValue:@"10" forKey:@"amount"];//金额
80 [payInfo setValue:@"ios demo" forKey:@"extraInfo"];//外部订单信息 80 [payInfo setValue:@"ios demo" forKey:@"extraInfo"];//外部订单信息
81 [payInfo setValue:@"元宝" forKey:@"product"];//物品信息 81 [payInfo setValue:@"元宝" forKey:@"product"];//物品信息
82 [payInfo setValue:self.sessionKey forKey:@"sessionKey"];//登录成功的sessionKey 82 [payInfo setValue:self.sessionKey forKey:@"sessionKey"];//登录成功的sessionKey
83 [[LetsGameAPI instance] pay:payInfo handleCallBack:^{ 83 [[LetsGameAPI instance] pay:payInfo handleCallBack:^{
84 //第三方支付完成时的回调(包括支付成功和支付失败,除了支付过程中取消的),取消的不会有回调 84 //第三方支付完成时的回调(包括支付成功和支付失败,除了支付过程中取消的),取消的不会有回调
85 NSLog(@"第三方支付完成"); 85 NSLog(@"第三方支付完成");
86 }]]; 86 }]];
87 87
88 ### 7、IAP支付 88 ### 7、IAP支付
89 若要使用apple IAP支付,需要在AppDelegate的application: didFinishLaunchingWithOptions:方法内注册iap observer,使用如下方法 89 若要使用apple IAP支付,需要在AppDelegate的application: didFinishLaunchingWithOptions:方法内注册iap observer,使用如下方法
90 90
91 [[LetsGameAPI instance] registeIapObserver]; 91 [[LetsGameAPI instance] registeIapObserver];
92 具体调用iap支付的方法如下: 92 具体调用iap支付的方法如下:
93 93
94 [LetsGameAPI instance].appId = @"10022"; 94 [LetsGameAPI instance].appId = @"10022";
95 [LetsGameAPI instance].appKey = @"93a27b0bd99bac3e68a440b48aa421ab"; 95 [LetsGameAPI instance].appKey = @"93a27b0bd99bac3e68a440b48aa421ab";
96 NSMutableDictionary *payInfo = [NSMutableDictionary dictionary]; 96 NSMutableDictionary *payInfo = [NSMutableDictionary dictionary];
97 [payInfo setValue:@"5001" forKey:@"serverId"];//当前用户所在的服务器Id 97 [payInfo setValue:@"5001" forKey:@"serverId"];//当前用户所在的服务器Id
98 [payInfo setValue:@"10010" forKey:@"roleId"];//当前用户的角色id 98 [payInfo setValue:@"10010" forKey:@"roleId"];//当前用户的角色id
99 [payInfo setValue:@"1000" forKey:@"channelId"];//渠道id,用于统计 99 [payInfo setValue:@"1000" forKey:@"channelId"];//渠道id,用于统计
100 [payInfo setValue:@"10" forKey:@"amount"];//对应支付项的支付金额,实际支付金额以itunes配置为准 100 [payInfo setValue:@"10" forKey:@"amount"];//对应支付项的支付金额,实际支付金额以itunes配置为准
101 [payInfo setValue:@"ios demo" forKey:@"extraInfo"];//扩展信息,可以游戏自定义,建议传自有订单号 101 [payInfo setValue:@"ios demo" forKey:@"extraInfo"];//扩展信息,可以游戏自定义,建议传自有订单号
102 [payInfo setValue:@"test.product.1" forKey:@"product"];//itunes 后台配置的对应支付项的productId 102 [payInfo setValue:@"test.product.1" forKey:@"product"];//itunes 后台配置的对应支付项的productId
103 [[LetsGameAPI instance] iap:payInfo forUser:@"" succCallback:^(NSString *orderId) { 103 [[LetsGameAPI instance] iap:payInfo forUser:@"" succCallback:^(NSString *orderId) {
104 //此处的回调表明支付已经完成,但此时支付不一定成功,需要服务端验证支付结果 104 //此处的回调表明支付已经完成,但此时支付不一定成功,需要服务端验证支付结果
105 //orderId为gump生成的订单号,此订单号可以在gump server查询此笔支付是否成功 105 //orderId为gump生成的订单号,此订单号可以在gump server查询此笔支付是否成功
106 NSLog(@"IAP completed orderId of Gumptech:%@",orderId); 106 NSLog(@"IAP completed orderId of Gumptech:%@",orderId);
107 } failCallback:^(NSString *orderId) { 107 } failCallback:^(NSString *orderId) {
108 NSLog(@"IAP file orderId of Gumptech:%@",orderId); 108 NSLog(@"IAP file orderId of Gumptech:%@",orderId);
109 }]; 109 }];
110 110
111 ### 8、token的获取 111 ### 8、token的获取
112 FB登录之后会产生token并自动登录,需要如果需要token的话,需要自己调用接口获取。 112 FB登录之后会产生token并自动登录,需要如果需要token的话,需要自己调用接口获取。
113 113
114 //tokenString:token字符串 114 //tokenString:token字符串
115 //refreshTime:refreshTime token最后刷新的时间,即获取的token的时间 115 //refreshTime:refreshTime token最后刷新的时间,即获取的token的时间
116 //expirationTime:expirationTime token最后的有效时间 116 //expirationTime:expirationTime token最后的有效时间
117 [[LetsGameAPI instance] obtainAccessTokenSuccess:^(NSString *tokenString, NSString *refreshTime, NSString *expirationTime) { 117 [[LetsGameAPI instance] obtainAccessTokenSuccess:^(NSString *tokenString, NSString *refreshTime, NSString *expirationTime) {
118 NSLog(@"tokenString %@, refreshTime %@, expirationTime %@", tokenString, refreshTime, expirationTime); 118 NSLog(@"tokenString %@, refreshTime %@, expirationTime %@", tokenString, refreshTime, expirationTime);
119 } failure:^(NSString *errorString) { 119 } failure:^(NSString *errorString) {
120 NSLog(@"get token faile"); 120 NSLog(@"get token faile");
121 }]; 121 }];
122 122
123 123
124 ### 9、第三方支付版本 124 ### 9、第三方支付版本
125 第三方支付,分成两个版本:没有gump币和有gump币,不设置时默认为带gump币版本,如果使用不带gump币的版本如下设置: 125 第三方支付,分成两个版本:没有gump币和有gump币,不设置时默认为带gump币版本,如果使用不带gump币的版本如下设置:
126 126
127 需要在 application:didFinishLaunchingWithOptions方法中添加: 127 需要在 application:didFinishLaunchingWithOptions方法中添加:
128 128
129 [[LetsGameAPI instance] decideWebPayVersion:1] 129 [[LetsGameAPI instance] decideWebPayVersion:1]
130 130
131 131
132 ### 10、关于侵权还是侵权的接口显示 132 ### 10、关于侵权还是侵权的接口显示
133 运营在后台配置此包名和版本在什么时候显示侵权内容还是不侵权内容,此接口调用需要在游戏才开始加载的时候调用,返回值是YES的时候显示侵权内容,在NO的时候显示不侵权内容。 133 运营在后台配置此包名和版本在什么时候显示侵权内容还是不侵权内容,此接口调用需要在游戏才开始加载的时候调用,返回值是YES的时候显示侵权内容,在NO的时候显示不侵权内容。
134 134
135 注意:关于运营配置的游戏的版本号,我们默认取的是Bulid版本号的值,请注意。 135 注意:关于运营配置的游戏的版本号,我们默认取的是Bulid版本号的值,请注意。
136 136
137 [[LetsGameAPI instance] gameObtainSafeSetInfoWithAppId:@"10056" ChannelId:@"1000" handleCallBack:^(BOOL resultStatus) { 137 [[LetsGameAPI instance] gameObtainSafeSetInfoWithAppId:@"10056" ChannelId:@"1000" handleCallBack:^(BOOL resultStatus) {
138 if (resultStatus) { 138 if (resultStatus) {
139 NSLog(@"YES 侵权"); 139 NSLog(@"YES 侵权");
140 }else{ 140 }else{
141 NSLog(@"NO 不侵权"); 141 NSLog(@"NO 不侵权");
142 } 142 }
143 }]; 143 }];
144 144
145 145
146 146
ios/GameSDK.framework/Versions/A/GameSDK
No preview for this file type
ios/GameSDK.framework/Versions/A/Headers/LSGAccount.h
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 2
3 typedef NS_ENUM(NSInteger, LSGAccountType) { 3 typedef NS_ENUM(NSInteger, LSGAccountType) {
4 LSGAccountTypeRegist = 1, 4 LSGAccountTypeRegist = 1,
5 LSGAccountTypeFBRegist = 2, 5 LSGAccountTypeFBRegist = 2,
6 LSGAccountTypeQuickRegist = 4, 6 LSGAccountTypeQuickRegist = 4,
7 LSGAccountTypeVKRegist = 8, 7 LSGAccountTypeVKRegist = 8,
8 LSGAccountTypeGoogleRegist = 16, 8 LSGAccountTypeGoogleRegist = 16,
9 LSGAccountTypeWeChatRegist = 32,
10 LSGAccountTypeLineRegist = 64,
9 }; 11 };
10 12
11 //判断是不是自动登录情况 13 //判断是不是自动登录情况
12 #define LSGAccountTypeBaseLogin 32 14 #define LSGAccountTypeBaseLogin 128
13 15
14 @interface LSGAccount : NSObject 16 @interface LSGAccount : NSObject
15 17
16 @property(nonatomic, assign) LSGAccountType type; 18 @property(nonatomic, assign) LSGAccountType type;
17 @property(nonatomic, strong) NSString *username; 19 @property(nonatomic, strong) NSString *username;
18 @property(nonatomic, strong) NSString *nickName; 20 @property(nonatomic, strong) NSString *nickName;
19 @property(nonatomic, strong) NSString *password; 21 @property(nonatomic, strong) NSString *password;
20 @property(nonatomic, strong) NSString *userId; 22 @property(nonatomic, strong) NSString *userId;
21 @property(nonatomic, strong) NSString *sessionKey; 23 @property(nonatomic, strong) NSString *sessionKey;
22 @property(nonatomic, strong) NSString *deviceId; 24 @property(nonatomic, strong) NSString *deviceId;
23 25
24 + (void)saveAccount:(NSString *)service account:(LSGAccount *)account; 26 + (void)saveAccount:(NSString *)service account:(LSGAccount *)account;
25 27
26 + (LSGAccount *)loadAccount:(NSString *)service; 28 + (LSGAccount *)loadAccount:(NSString *)service;
27 29
28 + (void)deleteAccount:(NSString *)service; 30 + (void)deleteAccount:(NSString *)service;
29 31
30 @end 32 @end
31 33
ios/GameSDK.framework/Versions/A/Headers/LetsGameAPI.h
1 1
2 #import <Foundation/Foundation.h> 2 #import <Foundation/Foundation.h>
3 #import "LSGAccount.h" 3 #import "LSGAccount.h"
4 #import "VKBridgeProtocol.h" 4 #import "VKBridgeProtocol.h"
5 5
6 6
7 typedef void (^LSGLoginSuccBlock)(NSString *userId, NSString *sessionKey, LSGAccountType type); 7 typedef void (^LSGLoginSuccBlock)(NSString *userId, NSString *sessionKey, LSGAccountType type);
8 typedef void (^LSGDismissBlock)(void); 8 typedef void (^LSGDismissBlock)(void);
9 9
10 static BOOL isDisableFB = NO; 10 static BOOL isDisableFB = NO;
11 11
12 static BOOL isEnableVK = NO; 12 static BOOL isEnableVK = NO;
13 13
14 static BOOL isDisableLine = NO;
15
16 static BOOL isDisableWeChat = NO;
17
14 static BOOL isDisableGoogle = NO; 18 static BOOL isDisableGoogle = NO;
15 19
16 static BOOL hiddenLogo = NO; 20 static BOOL hiddenLogo = NO;
17 21
18 static NSString *version = @"3.5.3"; 22 //默认横屏
23 static BOOL DeviceOrientationIsHorizontal = YES;
24
25 static NSString *version = @"3.4.14";
19 26
20 @interface LetsGameAPI : NSObject<UIApplicationDelegate> 27 @interface LetsGameAPI : NSObject<UIApplicationDelegate>
21 28
22 @property (nonatomic, strong) NSString *appId; 29 @property (nonatomic, strong) NSString *appId;
23 @property (nonatomic, strong) NSString *appKey; 30 @property (nonatomic, strong) NSString *appKey;
24 @property (nonatomic, copy) LSGLoginSuccBlock succBlock; 31 @property (nonatomic, copy) LSGLoginSuccBlock succBlock;
25 @property (nonatomic, copy) LSGDismissBlock dismissBlock; 32 @property (nonatomic, copy) LSGDismissBlock dismissBlock;
26 //@property (nonatomic, assign) int isDebug;
27 @property (nonatomic, assign) int decideWebPay; 33 @property (nonatomic, assign) int decideWebPay;
28 @property (nonatomic,retain) id<VKBridgeProtocol> vkBridge; 34 @property (nonatomic,retain) id<VKBridgeProtocol> vkBridge;
29 //@property(nonatomic,strong) NSString *version; 35 //@property(nonatomic,strong) NSString *version;
30 36
31 + (instancetype)instance; 37 + (instancetype)instance;
32 38
33 -(NSString*)version; 39 -(NSString*)version;
34 40
35 - (void)showLoginView; 41 - (void)showLoginView;
36 - (void)showLoginViewInView:(UIView *)view; 42 - (void)showLoginViewInView:(UIView *)view;
37 43
38 +(void)disableFB:(BOOL)isDisable; 44 +(void)disableFB:(BOOL)isDisable;
39 +(void)disableGoogle:(BOOL)isDisable; 45 +(void)disableGoogle:(BOOL)isDisable;
46 +(void)disableWeChat:(BOOL)isDisable;
47 +(void)disableLine:(BOOL)isDissable;
40 +(BOOL)isFBDisable; 48 +(BOOL)isFBDisable;
41 +(BOOL)isVKEnable; 49 +(BOOL)isVKEnable;
50 +(BOOL)isWeChatDisable;
42 +(BOOL)isGoogleDisable; 51 +(BOOL)isGoogleDisable;
52 +(BOOL)isLineDisable;
43 +(void)hiddenLogo:(BOOL)isHidden; 53 +(void)hiddenLogo:(BOOL)isHidden;
44 +(BOOL)isHiddenLogo; 54 +(BOOL)isHiddenLogo;
55 +(void)DeviceOrientationIsHorizontal:(BOOL)isDisable;
56 +(BOOL)DeviceOrientationIsHorizontal;
45 57
46 - (void)logout; 58 - (void)logout;
47 59
48 - (void)hide; 60 - (void)hide;
61 //是否安装微信
62 -(BOOL)isWeChatInstall;
63 //向微信注册应用
64 -(void)registerAppWeChatWithAppId:(NSString *)appId
65 appKey:(NSString *)appKey
66 Success:(void (^)())success
67 failure:(void (^)())failure;
49 68
50 - (BOOL)handleOpenURL:(NSURL *)url 69 - (BOOL)handleOpenURL:(NSURL *)url
51 sourceApplication:(NSString *)sourceApplication; 70 sourceApplication:(NSString *)sourceApplication;
52 71
53 -(void)pay:(NSDictionary*) payInfo handleCallBack:(void (^)()) payAccomplistCallback; 72 -(void)pay:(NSDictionary*) payInfo handleCallBack:(void (^)()) payAccomplistCallback;
54 73
55 //-(void)iap:(NSDictionary*) payInfo forUser:(NSString*) uid handleCallback:(void (^)(NSString* orderId)) callback; 74 //-(void)iap:(NSDictionary*) payInfo forUser:(NSString*) uid handleCallback:(void (^)(NSString* orderId)) callback;
56 75
57 -(void)iap:(NSDictionary*) payInfo forUser:(NSString*) uid succCallback:(void (^)(NSString* orderId)) succCallback failCallback:(void (^)(NSString* orderId)) failCallback; 76 -(void)iap:(NSDictionary*) payInfo forUser:(NSString*) uid succCallback:(void (^)(NSString* orderId)) succCallback failCallback:(void (^)(NSString* orderId)) failCallback;
58 77
59 -(void)registeIapObserver; 78 -(void)registeIapObserver;
60 79
61 //-(void)decideIsDebug:(int)isDebug;
62
63 -(void)decideWebPayVersion:(int)decideWebPay; 80 -(void)decideWebPayVersion:(int)decideWebPay;
64 81
65 -(void)obtainAccessTokenSuccess:(void (^)(NSString *tokenString, NSString *refreshTime, NSString *expirationTime))success 82 -(void)obtainAccessTokenSuccess:(void (^)(NSString *tokenString, NSString *refreshTime, NSString *expirationTime))success
66 failure:(void (^)(NSString *errorString))failure; 83 failure:(void (^)(NSString *errorString))failure;
67 84
68 //获取是否展示安全页面,YES展示侵权页面,NO展示非侵权页面 85 //获取是否展示安全页面,YES展示侵权页面,NO展示非侵权页面
69 -(void)gameObtainSafeSetInfoWithAppId:(NSString *)appId 86 -(void)gameObtainSafeSetInfoWithAppId:(NSString *)appId
70 ChannelId:(NSString *)channelId 87 ChannelId:(NSString *)channelId
No preview for this file type
ios/GameSDKResources.bundle/PayJs.txt
1 ;(function() { 1 ;(function() {
2 var messagingIframe,webInfoIframe, 2 var messagingIframe,webInfoIframe,
3 bridge = 'sdk', 3 bridge = 'sdk',
4 CUSTOM_PROTOCOL_SCHEME = 'jscall'; 4 CUSTOM_PROTOCOL_SCHEME = 'jscall';
5 5
6 6
7 if (window[bridge]) { return } 7 if (window[bridge]) { return }
8 8
9 // 创建隐藏的iframe 9 // 创建隐藏的iframe
10 function _createQueueReadyIframe(doc) { 10 function _createQueueReadyIframe(doc) {
11 messagingIframe = doc.createElement('iframe'); 11 messagingIframe = doc.createElement('iframe');
12 messagingIframe.style.display = 'none'; 12 messagingIframe.style.display = 'none';
13 doc.documentElement.appendChild(messagingIframe); 13 doc.documentElement.appendChild(messagingIframe);
14 webInfoIframe = doc.createElement('iframe'); 14 webInfoIframe = doc.createElement('iframe');
15 webInfoIframe.style,display = 'none'; 15 webInfoIframe.style,display = 'none';
16 doc.documentElement.appendChild(webInfoIframe); 16 doc.documentElement.appendChild(webInfoIframe);
17 } 17 }
18 18
19 19
20 20
21 window[bridge] = {}; 21 window[bridge] = {};
22 22
23 window[bridge]['webVer'] = function webVer(webVer){ 23 window[bridge]['webVer'] = function webVer(webVer){
24 24
25 webInfoIframe.src=CUSTOM_PROTOCOL_SCHEME + ':' + arguments.callee.name + ':' + encodeURIComponent(JSON.stringify(arguments)); 25 webInfoIframe.src=CUSTOM_PROTOCOL_SCHEME + ':' + arguments.callee.name + ':' + encodeURIComponent(JSON.stringify(arguments));
26 }; 26 };
27 27
28 28
29 29
30 window[bridge]['payWithBlue'] = function payWithBlue(payGateId,price,cardNO,roleId){ 30 window[bridge]['payWithBlue'] = function payWithBlue(payGateId,price,cardNO,roleId){
31 31
32 messagingIframe.src=CUSTOM_PROTOCOL_SCHEME + ':' + arguments.callee.name + ':' + encodeURIComponent(JSON.stringify(arguments)); 32 messagingIframe.src=CUSTOM_PROTOCOL_SCHEME + ':' + arguments.callee.name + ':' + encodeURIComponent(JSON.stringify(arguments));
33 }; 33 };
34 34
35 35
36 window[bridge]['closeWin'] = function closeWin(oid,status,extraInfo){ 36 window[bridge]['closeWin'] = function closeWin(oid,status,extraInfo){
37 37
38 messagingIframe.src=CUSTOM_PROTOCOL_SCHEME + ':' + arguments.callee.name + ':' + encodeURIComponent(JSON.stringify(arguments)); 38 messagingIframe.src=CUSTOM_PROTOCOL_SCHEME + ':' + arguments.callee.name + ':' + encodeURIComponent(JSON.stringify(arguments));
39 }; 39 };
40 40
41 //var methods = ["closeWin(uid,nick,sessionKey)"]; 41 //var methods = ["closeWin(uid,nick,sessionKey)"];
42 //var methodsWithoutParam =["closeWin"]; 42 //var methodsWithoutParam =["closeWin"];
43 //for (var i=0;i<methods.length;i++){ 43 //for (var i=0;i<methods.length;i++){
44 // var method = methods[i]; 44 // var method = methods[i];
45 // var methodWithoutParam = methodsWithoutParam[i]; 45 // var methodWithoutParam = methodsWithoutParam[i];
46 // var code = "(window[bridge])[methodWithoutParam] = function " + method + " {var fs =CUSTOM_PROTOCOL_SCHEME + ':' + arguments.callee.name + ':' + encodeURIComponent(JSON.stringify(arguments)); messagingIframe.src = fs;alert('closeWin src:'+messagingIframe.src);}"; 46 // var code = "(window[bridge])[methodWithoutParam] = function " + method + " {var fs =CUSTOM_PROTOCOL_SCHEME + ':' + arguments.callee.name + ':' + encodeURIComponent(JSON.stringify(arguments)); messagingIframe.src = fs;alert('closeWin src:'+messagingIframe.src);}";
47 // eval(code); 47 // eval(code);
48 //} 48 //}
49 49
50 //创建iframe,必须在创建app之后,否则会出现死循环 50 //创建iframe,必须在创建app之后,否则会出现死循环
51 _createQueueReadyIframe(document); 51 _createQueueReadyIframe(document);
52 //通知js开始初始化 52 //通知js开始初始化
53 if(typeof(onInjectJsOver)=='function') 53 if(typeof(onInjectJsOver)=='function')
54 onInjectJsOver(); 54 onInjectJsOver();
55 55
56 })(); 56 })();
57
ios/GameSDKResources.bundle/en.strings
1 "user_name_hint" = "Email"; 1 "user_name_hint" = "Account";
2 "password_hint" = "Password"; 2 "password_hint" = "Password";
3 "quick_play" = "Play as Guest"; 3 "quick_play" = "Guest login";
4 "login" = "Login"; 4 "login" = "Log In";
5 "gump_login" = "Login"; 5 "gump_login" = "Login";
6 "signup" = "Sign up"; 6 "signup" = "Sign up";
7 "bind" = "Bind your email"; 7 "bind" = "Bind your email";
8 "loading" = "Loading"; 8 "loading" = "Loading";
9 "cancel" = "Cancel"; 9 "cancel" = "Cancel";
10 "ok" = "OK"; 10 "ok" = "OK";
11 "illegal_uname_tip" = "Invalid Email"; 11 "illegal_uname_tip" = "Invalid Email";
12 "illegal_pwd_tip" = "Invalid Password (6-20 characters)"; 12 "illegal_pwd_tip" = "Invalid Password (6-20 characters)";
13 "illegal_user_exist" = "Email has already been used"; 13 "illegal_user_exist" = "Email has already been used";
14 "illegal_pwd_invalid" = "Incorrect password. Please try again."; 14 "illegal_pwd_invalid" = "Password error";
15 "illegal_user_not_exist" = "Invalid Email"; 15 "illegal_user_not_exist" = "Invalid Email";
16 "invalid_email" = "Please input your email"; 16 "invalid_email" = "Please input your email";
17 "login_fail" = "Login Failed"; 17 "login_fail" = "Login Failed";
18 "signup_fail" = "Signup Failed"; 18 "signup_fail" = "Signup Failed";
19 "bind_fail" = "Bind Failed"; 19 "bind_fail" = "Bind Failed";
20 "switch"="Switch Account"; 20 "switch"="Switch Account";
21 "change_password" = "Change Password"; 21 "change_password" = "Modify Password";
22 "current_password" = "Current Password"; 22 "current_password" = "Current Password";
23 "change_password_notice" = “Current passeord isn't required when reset password."; 23 "change_password_notice" = “Current passeord isn't required when reset password.";
24 "new_password" = "New Password"; 24 "new_password" = "New Password";
25 "Reset" = "Reset"; 25 "Reset" = "Forget Password? Touch this";
26 "Confirm" = "Confirm"; 26 "Confirm" = "Confirm";
27 "Succeed" = "Succeed"; 27 "Succeed" = "Succeed";
28 "reset_fail" = "Reset failed, please contact customer service"; 28 "reset_fail" = "Reset failed, please contact customer service";
29 "reset_success" = "An Email has been sent to you, please follow the instructions in Email.";
29 "reset_success" = "Verified email has been sent. Please reset Password according to the email";
30 "forget_change_password" = "Modify/Forget Password";
31 "other_login_style" = "Others";
32 "account_pwd_invalid" = "Please input both account and password";
33 "new_old_password_diff" = "Password mismatch";
34 "Confirm_password" = "Confirm";
35 "input_new_pwd" = "Please input new password";
36 "back" = "Back";
ios/GameSDKResources.bundle/images/em@2x.png

1.32 KB

ios/GameSDKResources.bundle/images/face@2x.png

1.25 KB

ios/GameSDKResources.bundle/images/google@2x.png

1.75 KB

ios/GameSDKResources.bundle/images/ic_line@2x.png

11.7 KB

ios/GameSDKResources.bundle/images/ic_wc@2x.png

4.82 KB

ios/GameSDKResources.bundle/images/icon_back@2x.png

1.58 KB | W: | H:

1.52 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
ios/GameSDKResources.bundle/images/line@2x.png

2.14 KB

ios/GameSDKResources.bundle/images/pwd@2x.png

1.14 KB

ios/GameSDKResources.bundle/images/split@2x.png

461 Bytes

ios/GameSDKResources.bundle/images/tri@2x.png

550 Bytes

ios/GameSDKResources.bundle/images/vk@2x.png

1.83 KB

ios/GameSDKResources.bundle/images/we@2x.png

2.25 KB

ios/GameSDKResources.bundle/template.html
1 <!doctype html> File was deleted
2 <html>
3 <head>
4 <script src="http://code.angularjs.org/angular-1.0.1.min.js"></script>
5
6 </head>
7 <body ng-app="myApp" ng-controller="mainCtrl">
8
9 <button ng-click="refresh()">refresh</button>
10 <div style="background: #07242E; color: #708284;height: auto;overflow: auto;min-height: 600px;max-height:700px" >
11
12 <ul>
13 <li ng-repeat="x in items" style='font-size:15px'>
14 {{ x.logtime }} &nbsp; [{{x.level}}]-{{x.filename}}:{{x.line}}/{{x.function}} &nbsp;=> {{x.message}}
15 </li>
16 </ul>
17
18 </div>
19
20 <script>
21 var app = angular.module('myApp', []);
22
23 app.controller('mainCtrl', function($scope, $http) {
24 $http.get(location+'logs').success(function(response) {
25 $scope.items = response;
26 });
27 $scope.refresh = function(){
28 $http.get(location+'logs').success(function(response){
29 $scope.items = response;
30 });
31 };
32 });
33
34 </script>
35 </body>
36 </html>
ios/GameSDKResources.bundle/th.strings
1 "user_name_hint" = "อีเมลล์"; 1 "user_name_hint" = "ชื่อบัญชี";
2 "password_hint" = "พาสเวิร์ด"; 2 "password_hint" = "พาสเวิร์ด";
3 "quick_play" = "การเล่นของผู้เข้าพัก"; 3 "quick_play" = "บัญชีนักท่องเที่ยว";
4 "quick_login" = "เริ่มเล่น"; 4 "quick_login" = "เริ่มเล่น";
5 "login" = "ล็อกอิน"; 5 "login" = "ล็อคอินชื่อบัญชีรหัสผ่าน";
6 "gump_login" = "Login"; 6 "gump_login" = "ล็อคอิน";
7 "signup" = "ลงทะเบียน"; 7 "signup" = "ลงทะเบียน";
8 "bind" = "ผูกอีเมลล์"; 8 "bind" = "ผูกอีเมลล์";
9 "loading" = "กำลังโหลด"; 9 "loading" = "กำลังโหลด";
10 "illegal_uname_tip" = "อีเมลล์ไม่ถูกต้อง"; 10 "illegal_uname_tip" = "อีเมลล์ไม่ถูกต้อง";
11 "illegal_pwd_tip" = "พาสเวิร์ดไม่ถูกต้อง(6-20 ตัวอักษร)"; 11 "illegal_pwd_tip" = "พาสเวิร์ดไม่ถูกต้อง(6-20 ตัวอักษร)";
12 "illegal_user_exist" = "อีเมลล์นี้ได้ถูกใช้แล้ว"; 12 "illegal_user_exist" = "อีเมลล์นี้ได้ถูกใช้แล้ว";
13 "illegal_pwd_invalid" = "พาสเวิร์ดไม่ถูกต้อง, โปรดลองใหม่อีกครั้ง"; 13 "account_pwd_invalid" = "ชื่อบัญชีและรหัสผ่านห้ามเว้นว่าง";
14 "illegal_user_not_exist" = "อีเมลล์ไม่ถูกต้อง"; 14 "illegal_user_not_exist" = "อีเมลล์ไม่ถูกต้อง";
15 "invalid_email" = "ใส่อีเมลล์ของคุณ"; 15 "invalid_email" = "ใส่อีเมลล์ของคุณ";
16 "login_fail" = "ล็อกอินผิดพลาด"; 16 "login_fail" = "ล็อกอินผิดพลาด";
17 "signup_fail" = "ลงทะเบียนไม่สำเร็จ"; 17 "signup_fail" = "ลงทะเบียนไม่สำเร็จ";
18 "bind_fail" = "ผูกอีเมลล์ไม่สำเร็จ"; 18 "bind_fail" = "ผูกอีเมลล์ไม่สำเร็จ";
19 "change_password" = "แก้ไขพาสเวิร์ด"; 19 "change_password" = "แก้ไขรหัสผ่าน";
20 "current_password" = "พาสเวิร์ดปัจจุบัน"; 20 "current_password" = "พาสเวิร์ดปัจจุบัน";
21 "change_password_notice" = "ไม่สามารถตั้งพาสเวิร์ดซ้ำกับพาสเวิร์ดปัจจุบันได้."; 21 "change_password_notice" = "ไม่สามารถตั้งพาสเวิร์ดซ้ำกับพาสเวิร์ดปัจจุบันได้.";
22 "new_password" = "พาสเวิร์ดใหม่"; 22 "new_password" = "พาสเวิร์ดใหม่";
23 "Reset" = "ตั้งพาสเวิร์ด"; 23 "Reset" = "ลืมรหัสผ่าน?คลิกรีเซ็ตรหัสผ่าน";
24 "Confirm" = "ยืนยัน"; 24 "Confirm" = "ยืนยัน";
25 "Succeed" = "แก้ไขสำเร็จ"; 25 "Succeed" = "แก้ไขสำเร็จ";
26 "reset_fail" = "แก้ไขล้มเหลว,กรุณาติดต่อแอดมิน"; 26 "reset_fail" = "แก้ไขล้มเหลว,กรุณาติดต่อแอดมิน";
27 "reset_success" = "ระบบได้แจ้งข้อมูลการเปลี่ยนพาสเวิร์ดไปยังอีเมลล์สำรอง กรุณาทำตามขั้นตอนในอีเมลล์."; 27 "reset_success" = "ส่งอีเมลล์ยืนยันแล้ว กรุณาทำตามขั้นตอนที่ระบุในอีเมลล์เพื่อรีเซ็ตรหัสผ่าน";
28 "forget_change_password" = "แก้ไข/ลืมรหัสผ่าน";
29 "other_login_style" = "ล็อคอินช่องทางอื่น";
30 "new_old_password_diff" = "รหัสผ่านไม่เหมือนกัน";
31 "Confirm_password" = "ยืนยันรหัสผ่าน";
32 "input_new_pwd" = "กรุณากรอกรหัสผ่านใหม่";
33 "back" = "ย้อนกลับ";
28 34
ios/GameSDKResources.bundle/zh-Hans.strings
1 "user_name_hint" = "邮箱"; 1 "user_name_hint" = "账号";
2 "password_hint" = "密码"; 2 "password_hint" = "密码";
3 "quick_login" = "一键进入"; 3 "quick_login" = "一键进入";
4 "quick_play" = "Play as Guest"; 4 "quick_play" = "游客登录";
5 "gump_login" = "Login"; 5 "gump_login" = "登录";
6 "login" = "登陆"; 6 "login" = "账号密码登录";
7 "loginFacebook" = "登录Facebook"; 7 "loginFacebook" = "登录Facebook";
8 "signup" = "注册"; 8 "signup" = "注册";
9 "bind" = "绑定邮箱"; 9 "bind" = "绑定邮箱";
10 "loading" = "加载中……"; 10 "loading" = "加载中……";
11 "illegal_uname_tip" = "邮箱不存在"; 11 "illegal_uname_tip" = "邮箱不存在";
12 "illegal_pwd_tip" = "密码格式不正确 (6–20字符)"; 12 "illegal_pwd_tip" = "密码格式不正确 (6–20字符)";
13 "illegal_user_exist" = "邮箱已注册"; 13 "illegal_user_exist" = "邮箱已注册";
14 "illegal_pwd_invalid" = "密码不正确,请重试"; 14 "illegal_pwd_invalid" = "密码错误";
15 "illegal_user_not_exist" = "邮箱格式不正确"; 15 "illegal_user_not_exist" = "邮箱格式不正确";
16 "invalid_email" = "请输入正确的邮箱"; 16 "invalid_email" = "请输入正确的邮箱";
17 "login_fail" = "登录失败"; 17 "login_fail" = "登录失败";
18 "signup_fail" = "注册失败"; 18 "signup_fail" = "注册失败";
19 "bind_fail" = "绑定失败"; 19 "bind_fail" = "绑定失败";
20 "GumptechLogin" = "甘普登录"; 20 "GumptechLogin" = "甘普登录";
21 "switch" = "切换账户"; 21 "switch" = "切换账户";
22 "change_password" = "修改密码"; 22 "change_password" = "修改密码?";
23 "current_password" = "当前密码"; 23 "current_password" = "当前密码";
24 "change_password_notice" = "重置密码时可不填写当前密码"; 24 "change_password_notice" = "重置密码时可不填写当前密码";
25 "new_password" = "新密码"; 25 "new_password" = "新密码";
26 "Reset" = "重置"; 26 "Reset" = "忘记密码?点此重置";
27 "Confirm" = "确定修改"; 27 "Confirm" = "确定";
28 "Succeed" = "修改成功"; 28 "Succeed" = "修改成功";
29 "reset_fail" = "修改失败,请与客服联系"; 29 "reset_fail" = "修改失败,请与客服联系";
30 "reset_success" = "密码重置邮件已发送到指定账户邮箱,请按邮件内的提示操作"; 30 "reset_success" = "验证邮件已发送,请按照邮件提示进行密码重置";
31 "other_login_style" = "其他登录方式";
32 "account_pwd_invalid" = "账号和密码不能为空";
33 "new_old_password_diff" = "密码不一致";
34 "Confirm_password" = "确认密码";
35 "forget_change_password" = "修改/忘记密码?";
36 "input_new_pwd" = "请输入新密码";
37 "back" = "返回";
31 38
ios/GameSDKResources.bundle/zh-Hant.strings
1 "user_name_hint" = "郵箱"; 1 "user_name_hint" = "帳號";
2 "password_hint" = "密碼"; 2 "password_hint" = "密碼";
3 "quick_login" = "一鍵進入"; 3 "quick_login" = "一鍵進入";
4 "quick_play" = "Play as Guest"; 4 "quick_play" = "遊客登陸";
5 "gump_login" = "Login"; 5 "gump_login" = "登錄";
6 "login" = "登陸"; 6 "login" = "帳號密碼登錄";
7 "signup" = "註冊"; 7 "signup" = "註冊";
8 "bind" = "綁定郵箱"; 8 "bind" = "綁定郵箱";
9 "loading" = "加載中……"; 9 "loading" = "加載中……";
10 "illegal_uname_tip" = "郵箱不存在"; 10 "illegal_uname_tip" = "郵箱不存在";
11 "illegal_pwd_tip" = "密碼格式不爭取 (6–20字符)"; 11 "illegal_pwd_tip" = "密碼格式不爭取 (6–20字符)";
12 "illegal_user_exist" = "郵箱已註冊"; 12 "illegal_user_exist" = "郵箱已註冊";
13 "illegal_pwd_invalid" = "密碼不正確,請重試"; 13 "illegal_pwd_invalid" = "密碼錯誤";
14 "illegal_user_not_exist" = "郵箱格式不正確"; 14 "illegal_user_not_exist" = "郵箱格式不正確";
15 "invalid_email" = "請輸入正確的郵箱"; 15 "invalid_email" = "請輸入正確的郵箱";
16 "login_fail" = "登陸失敗"; 16 "login_fail" = "登陸失敗";
17 "signup_fail" = "註冊失敗"; 17 "signup_fail" = "註冊失敗";
18 "bind_fail" = "綁定失敗"; 18 "bind_fail" = "綁定失敗";
19 "GumptechLogin" = "甘普登錄"; 19 "GumptechLogin" = "甘普登錄";
20 "switch" = "切換賬號"; 20 "switch" = "切換賬號";
21 "change_password" = "修改密碼"; 21 "change_password" = "修改密碼";
22 "current_password" = "當前密碼"; 22 "current_password" = "當前密碼";
23 "change_password_notice" = "重置密碼時可不填寫當前密碼"; 23 "change_password_notice" = "重置密碼時可不填寫當前密碼";
24 "new_password" = "新密碼"; 24 "new_password" = "新密碼";
25 "Reset" = "重置"; 25 "Reset" = "忘記密碼點此重置";
26 "Confirm" = "確定修改"; 26 "Confirm" = "確定";
27 "Succeed" = "修改成功"; 27 "Succeed" = "修改成功";
28 "reset_fail" = "修改失败,請與客服聯系"; 28 "reset_fail" = "修改失败,請與客服聯系";
29 "reset_success" = "密碼重置郵件已發送到指定賬戶郵箱,請按郵件內的提示操作";
29 "reset_success" = "驗證郵件已發送,請按照郵件提示進行重置";
30 "other_login_style" = "其他登錄方式";
31 "account_pwd_invalid" = "帳號或密碼不能為空";
32 "new_old_password_diff" = "密碼不一致";
33 "Confirm_password" = "確認密碼";
34 "forget_change_password" = "修改/忘記密碼";
35 "input_new_pwd" = "請輸入新密碼";
36 "back" = "返回";