Commit ac9cc1e151b32d8e06a852f1954ee5240d16c6a1

Authored by alexYang
1 parent 6cbde3a598
Exists in master

活动sdk增加活动类型参数

Showing 6 changed files with 12 additions and 13 deletions Inline Diff

ios/GameActivitySDK.framework/Versions/A/GameActivitySDK
No preview for this file type
ios/GameActivitySDK.framework/Versions/A/Headers/LetsGameActivityAPI.h
1 // 1 //
2 // LetsGameActivityAPI.h 2 // LetsGameActivityAPI.h
3 // GameActivitySDK 3 // GameActivitySDK
4 // 4 //
5 // Created by yanglele on 2018/6/11. 5 // Created by yanglele on 2018/6/11.
6 // Copyright © 2018年 alexYang. All rights reserved. 6 // Copyright © 2018年 alexYang. All rights reserved.
7 // 7 //
8 8
9 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
10 #import <UIKit/UIKit.h> 10 #import <UIKit/UIKit.h>
11 11
12 static NSString *actVersion = @"1.0.2"; 12 static NSString *actVersion = @"1.0.2";
13 13
14 @interface LetsGameActivityAPI : NSObject<UIApplicationDelegate> 14 @interface LetsGameActivityAPI : NSObject<UIApplicationDelegate>
15 15
16 @property(nonatomic, assign) int isDebug; 16 @property(nonatomic, assign) int isDebug;
17 @property(nonatomic, assign) int allowRotate;
18 @property(nonatomic, assign) BOOL supportLandscape;
19 17
20 +(instancetype)instance; 18 +(instancetype)instance;
21 19
22 - (void)hide; 20 - (void)hide;
23 21
24 -(void)decideIsDebug:(int)isDebug; 22 -(void)decideIsDebug:(int)isDebug;
25 23
26 -(void)decideAllowRotate:(int)allowRotate;
27
28 -(void)GameActivityWithParaDictory:(NSDictionary *)paraDictory handleCallBackL:(void(^)(void))accomplistCallBack; 24 -(void)GameActivityWithParaDictory:(NSDictionary *)paraDictory handleCallBackL:(void(^)(void))accomplistCallBack;
29 25
30 @end 26 @end
31 27
No preview for this file type
ios/GameSDKDemo/GameSDKDemo.xcodeproj/project.xcworkspace/xcuserdata/yanglele.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
ios/GameSDKDemo/letsgameDemo/LSGAppDelegate.m
1 // 1 //
2 // LSGAppDelegate.m 2 // LSGAppDelegate.m
3 // letsgameDemo 3 // letsgameDemo
4 // 4 //
5 // Created by zhy on 14-5-24. 5 // Created by zhy on 14-5-24.
6 // 6 //
7 // 7 //
8 8
9 #import "LSGAppDelegate.h" 9 #import "LSGAppDelegate.h"
10 #import "LSGMainViewController.h" 10 #import "LSGMainViewController.h"
11 #import "LetsGameAPI.h" 11 #import "LetsGameAPI.h"
12 #import "LetsGameActivityAPI.h" 12 #import "LetsGameActivityAPI.h"
13 13
14 @implementation LSGAppDelegate 14 @implementation LSGAppDelegate
15 15
16 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
17 { 17 {
18 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 18 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
19 // [LetsGameAPI DeviceOrientationIsHorizontal:NO]; 19 // [LetsGameAPI DeviceOrientationIsHorizontal:NO];
20 20
21 LSGMainViewController *viewController = [[LSGMainViewController alloc] init]; 21 LSGMainViewController *viewController = [[LSGMainViewController alloc] init];
22 self.window.rootViewController = viewController; 22 self.window.rootViewController = viewController;
23 [self.window addSubview:viewController.view]; 23 [self.window addSubview:viewController.view];
24 24
25 self.window.backgroundColor = [UIColor whiteColor]; 25 self.window.backgroundColor = [UIColor whiteColor];
26 [self.window makeKeyAndVisible]; 26 [self.window makeKeyAndVisible];
27 27
28 // [[LetsGameAPI instance] decideIsDebug:1]; 28 // [[LetsGameAPI instance] decideIsDebug:1];
29 // [[LetsGameAPI instance] decideWebToVersion:1]; 29 // [[LetsGameAPI instance] decideWebToVersion:1];
30 30
31 //显示是否侵权的接口 31 //显示是否侵权的接口
32 [[LetsGameAPI instance] gameObtainSafeSetInfoWithAppId:@"10056" ChannelId:@"1000" handleCallBack:^(BOOL resultStatus) { 32 [[LetsGameAPI instance] gameObtainSafeSetInfoWithAppId:@"10056" ChannelId:@"1000" handleCallBack:^(BOOL resultStatus) {
33 if (resultStatus) { 33 if (resultStatus) {
34 NSLog(@"YES 侵权"); 34 NSLog(@"YES 侵权");
35 }else{ 35 }else{
36 NSLog(@"NO 不侵权"); 36 NSLog(@"NO 不侵权");
37 } 37 }
38 }]; 38 }];
39 39
40 [[UIApplication sharedApplication] setStatusBarHidden:YES]; 40 [[UIApplication sharedApplication] setStatusBarHidden:YES];
41 [[LetsGameAPI instance] registeIapObserver]; 41 [[LetsGameAPI instance] registeIapObserver];
42 42
43 return YES; 43 return YES;
44 } 44 }
45 45
46 - (void)applicationWillResignActive:(UIApplication *)application 46 - (void)applicationWillResignActive:(UIApplication *)application
47 { 47 {
48 // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 48 // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
49 // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 49 // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
50 } 50 }
51 51
52 - (void)applicationDidEnterBackground:(UIApplication *)application 52 - (void)applicationDidEnterBackground:(UIApplication *)application
53 { 53 {
54 // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 54 // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
55 // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 55 // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
56 } 56 }
57 57
58 - (void)applicationWillEnterForeground:(UIApplication *)application 58 - (void)applicationWillEnterForeground:(UIApplication *)application
59 { 59 {
60 // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 60 // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
61 } 61 }
62 62
63 -(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{ 63 -(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{
64 return [[LetsGameAPI instance] handleOpenURL:url sourceApplication:sourceApplication]; 64 return [[LetsGameAPI instance] handleOpenURL:url sourceApplication:sourceApplication];
65 65
66 } 66 }
67 67
68 //-(UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{
69 // if([LetsGameActivityAPI instance].supportLandscape == YES){
70 // return UIInterfaceOrientationMaskPortrait;
71 // }else{
72 // return UIInterfaceOrientationMaskLandscape;
73 // }
74 //}
75 68
76 @end 69 @end
77 70
ios/GameSDKDemo/letsgameDemo/LSGMainViewController.m
1 // 1 //
2 // LSGMainViewController.m 2 // LSGMainViewController.m
3 // letsgameDemo 3 // letsgameDemo
4 // 4 //
5 // Created by zhy on 14-5-24. 5 // Created by zhy on 14-5-24.
6 // 6 //
7 // 7 //
8 8
9 #import "LSGMainViewController.h" 9 #import "LSGMainViewController.h"
10 #import "LetsGameAPI.h" 10 #import "LetsGameAPI.h"
11 #import "LetsGameActivityAPI.h" 11 #import "LetsGameActivityAPI.h"
12 12
13 13
14 @interface LSGMainViewController () 14 @interface LSGMainViewController ()
15 15
16 @property (nonatomic, strong) UILabel *resultLabel; 16 @property (nonatomic, strong) UILabel *resultLabel;
17 17
18 @property(nonatomic,copy) NSString *sessionKey; 18 @property(nonatomic,copy) NSString *sessionKey;
19
20 @property(nonatomic, strong) UITextField *activityTextField;
21
19 @end 22 @end
20 23
21 @implementation LSGMainViewController 24 @implementation LSGMainViewController
22 25
23 - (void)loadView { 26 - (void)loadView {
24 [super loadView]; 27 [super loadView];
25 NSLog(@"i come in"); 28 NSLog(@"i come in");
26 // self.view.backgroundColor = [UIColor whiteColor]; 29 // self.view.backgroundColor = [UIColor whiteColor];
27 self.view.backgroundColor = [UIColor blackColor]; 30 self.view.backgroundColor = [UIColor blackColor];
28 31
29 UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(110, 40, 100, 30)]; 32 UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(110, 40, 100, 30)];
30 btn.backgroundColor = [UIColor orangeColor]; 33 btn.backgroundColor = [UIColor orangeColor];
31 [btn setTitle:@"测试入口" forState:UIControlStateNormal]; 34 [btn setTitle:@"测试入口" forState:UIControlStateNormal];
32 [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 35 [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
33 btn.titleLabel.font = [UIFont systemFontOfSize:15]; 36 btn.titleLabel.font = [UIFont systemFontOfSize:15];
34 [btn addTarget:self action:@selector(onClickTest) forControlEvents:UIControlEventTouchUpInside]; 37 [btn addTarget:self action:@selector(onClickTest) forControlEvents:UIControlEventTouchUpInside];
35 [self.view addSubview:btn]; 38 [self.view addSubview:btn];
36 39
37 40
38 41
39 UIButton *bindtn = [[UIButton alloc] initWithFrame:CGRectMake(110, 100, 100, 30)]; 42 UIButton *bindtn = [[UIButton alloc] initWithFrame:CGRectMake(110, 100, 100, 30)];
40 bindtn.backgroundColor = [UIColor orangeColor]; 43 bindtn.backgroundColor = [UIColor orangeColor];
41 [bindtn setTitle:@"退出账号" forState:UIControlStateNormal]; 44 [bindtn setTitle:@"退出账号" forState:UIControlStateNormal];
42 [bindtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 45 [bindtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
43 bindtn.titleLabel.font = [UIFont systemFontOfSize:15]; 46 bindtn.titleLabel.font = [UIFont systemFontOfSize:15];
44 [bindtn addTarget:self action:@selector(onLogoutTest) forControlEvents:UIControlEventTouchUpInside]; 47 [bindtn addTarget:self action:@selector(onLogoutTest) forControlEvents:UIControlEventTouchUpInside];
45 [self.view addSubview:bindtn]; 48 [self.view addSubview:bindtn];
46 49
47 UIButton *payBtn = [[UIButton alloc] initWithFrame:CGRectMake(110, 160, 100, 30)]; 50 UIButton *payBtn = [[UIButton alloc] initWithFrame:CGRectMake(110, 160, 100, 30)];
48 payBtn.backgroundColor = [UIColor orangeColor]; 51 payBtn.backgroundColor = [UIColor orangeColor];
49 [payBtn setTitle:@"支付" forState:UIControlStateNormal]; 52 [payBtn setTitle:@"支付" forState:UIControlStateNormal];
50 [payBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 53 [payBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
51 payBtn.titleLabel.font = [UIFont systemFontOfSize:15]; 54 payBtn.titleLabel.font = [UIFont systemFontOfSize:15];
52 [payBtn addTarget:self action:@selector(onPayTest) forControlEvents:UIControlEventTouchUpInside]; 55 [payBtn addTarget:self action:@selector(onPayTest) forControlEvents:UIControlEventTouchUpInside];
53 [self.view addSubview:payBtn]; 56 [self.view addSubview:payBtn];
54 57
55 UIButton *iapBtn = [[UIButton alloc] initWithFrame:CGRectMake(110, 220, 100, 30)]; 58 UIButton *iapBtn = [[UIButton alloc] initWithFrame:CGRectMake(110, 220, 100, 30)];
56 iapBtn.backgroundColor = [UIColor orangeColor]; 59 iapBtn.backgroundColor = [UIColor orangeColor];
57 [iapBtn setTitle:@"IAP" forState:UIControlStateNormal]; 60 [iapBtn setTitle:@"IAP" forState:UIControlStateNormal];
58 [iapBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 61 [iapBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
59 iapBtn.titleLabel.font = [UIFont systemFontOfSize:15]; 62 iapBtn.titleLabel.font = [UIFont systemFontOfSize:15];
60 [iapBtn addTarget:self action:@selector(onIapTest) forControlEvents:UIControlEventTouchUpInside]; 63 [iapBtn addTarget:self action:@selector(onIapTest) forControlEvents:UIControlEventTouchUpInside];
61 [self.view addSubview:iapBtn]; 64 [self.view addSubview:iapBtn];
62 65
63 UIButton *activityBtn = [[UIButton alloc] initWithFrame:CGRectMake(110, 320, 100, 30)]; 66 UIButton *activityBtn = [[UIButton alloc] initWithFrame:CGRectMake(110, 320, 100, 30)];
64 activityBtn.backgroundColor = [UIColor orangeColor]; 67 activityBtn.backgroundColor = [UIColor orangeColor];
65 [activityBtn setTitle:@"Activity" forState:UIControlStateNormal]; 68 [activityBtn setTitle:@"Activity" forState:UIControlStateNormal];
66 [activityBtn setTintColor:[UIColor whiteColor]]; 69 [activityBtn setTintColor:[UIColor whiteColor]];
67 activityBtn.titleLabel.font = [UIFont systemFontOfSize:15]; 70 activityBtn.titleLabel.font = [UIFont systemFontOfSize:15];
68 [activityBtn addTarget:self action:@selector(onActivity) forControlEvents:UIControlEventTouchUpInside]; 71 [activityBtn addTarget:self action:@selector(onActivity) forControlEvents:UIControlEventTouchUpInside];
69 [self.view addSubview:activityBtn]; 72 [self.view addSubview:activityBtn];
73
74 UITextField *activityField = [[UITextField alloc] initWithFrame:CGRectMake(220, 320, 100, 30)];
75 activityField.placeholder = @"活动类型";
76 activityField.backgroundColor = [UIColor whiteColor];
77 self.activityTextField = activityField;
78 [self.view addSubview:self.activityTextField];
79
80
70 81
71 } 82 }
72 83
73 - (UILabel *)resultLabel { 84 - (UILabel *)resultLabel {
74 if (!_resultLabel) { 85 if (!_resultLabel) {
75 _resultLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(self.view.frame) - 90, self.view.frame.size.width, 60)]; 86 _resultLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(self.view.frame) - 90, self.view.frame.size.width, 60)];
76 _resultLabel.backgroundColor = [UIColor clearColor]; 87 _resultLabel.backgroundColor = [UIColor clearColor];
77 _resultLabel.textAlignment = NSTextAlignmentCenter; 88 _resultLabel.textAlignment = NSTextAlignmentCenter;
78 _resultLabel.textColor = [UIColor redColor]; 89 _resultLabel.textColor = [UIColor redColor];
79 _resultLabel.font = [UIFont systemFontOfSize:15]; 90 _resultLabel.font = [UIFont systemFontOfSize:15];
80 _resultLabel.numberOfLines = 4; 91 _resultLabel.numberOfLines = 4;
81 _resultLabel.lineBreakMode = NSLineBreakByWordWrapping; 92 _resultLabel.lineBreakMode = NSLineBreakByWordWrapping;
82 [self.view addSubview:_resultLabel]; 93 [self.view addSubview:_resultLabel];
83 } 94 }
84 95
85 return _resultLabel; 96 return _resultLabel;
86 } 97 }
87 98
88 99
89 - (void)onClickTest { 100 - (void)onClickTest {
90 101
91 [LetsGameAPI instance].appId = @"100"; 102 [LetsGameAPI instance].appId = @"100";
92 [LetsGameAPI instance].appKey = @"f899139df5e1059396431415e770c6dd"; 103 [LetsGameAPI instance].appKey = @"f899139df5e1059396431415e770c6dd";
93 [LetsGameAPI instance].channelId = @"1000"; 104 [LetsGameAPI instance].channelId = @"1000";
94 [LetsGameAPI hiddenLogo:YES]; 105 [LetsGameAPI hiddenLogo:YES];
95 NSLog(@"sdk version:%@",[[LetsGameAPI instance] version]); 106 NSLog(@"sdk version:%@",[[LetsGameAPI instance] version]);
96 //sdk login 初始化 107 //sdk login 初始化
97 [[LetsGameAPI instance] SDKLoginInitofResponse:^(BOOL result) { 108 [[LetsGameAPI instance] SDKLoginInitofResponse:^(BOOL result) {
98 if (result) { 109 if (result) {
99 NSLog(@"初始化成功"); 110 NSLog(@"初始化成功");
100 // [LetsGameAPI disableFB:YES]; 111 // [LetsGameAPI disableFB:YES];
101 // [LetsGameAPI disableGoogle:YES]; 112 // [LetsGameAPI disableGoogle:YES];
102 // [LetsGameAPI disableLine:YES]; 113 // [LetsGameAPI disableLine:YES];
103 114
104 [LetsGameAPI instance].succBlock = ^(NSString *userId, NSString *sessionKey, LSGAccountType type) { 115 [LetsGameAPI instance].succBlock = ^(NSString *userId, NSString *sessionKey, LSGAccountType type) {
105 self.sessionKey = sessionKey; 116 self.sessionKey = sessionKey;
106 self.resultLabel.text = [NSString stringWithFormat:@"login succ: userId = %@, sessionKey = %@, accountType = %ld", userId, sessionKey, type]; 117 self.resultLabel.text = [NSString stringWithFormat:@"login succ: userId = %@, sessionKey = %@, accountType = %ld", userId, sessionKey, type];
107 }; 118 };
108 [LetsGameAPI instance].dismissBlock = ^() { 119 [LetsGameAPI instance].dismissBlock = ^() {
109 //登录失败操作 120 //登录失败操作
110 self.resultLabel.text = @"dismiss without login"; 121 self.resultLabel.text = @"dismiss without login";
111 }; 122 };
112 123
113 [[LetsGameAPI instance] showLoginView]; 124 [[LetsGameAPI instance] showLoginView];
114 }else{ 125 }else{
115 NSLog(@"初始化失败"); 126 NSLog(@"初始化失败");
116 self.resultLabel.text = @"初始化失败"; 127 self.resultLabel.text = @"初始化失败";
117 } 128 }
118 }]; 129 }];
119 130
120 } 131 }
121 132
122 133
123 - (void)onLogoutTest { 134 - (void)onLogoutTest {
124 [LetsGameAPI instance].appId = @"10056"; 135 [LetsGameAPI instance].appId = @"10056";
125 [LetsGameAPI instance].appKey = @"b59c21a078fde074a6750e91ed19fb21"; 136 [LetsGameAPI instance].appKey = @"b59c21a078fde074a6750e91ed19fb21";
126 [[LetsGameAPI instance] logout]; 137 [[LetsGameAPI instance] logout];
127 138
128 } 139 }
129 140
130 -(void)onPayTest{ 141 -(void)onPayTest{
131 [LetsGameAPI instance].appId = @"10103";//@"10056";//10022 142 [LetsGameAPI instance].appId = @"10103";//@"10056";//10022
132 [LetsGameAPI instance].appKey = @"f53eb4122d5e2ce81a12093f8f9ce922";//@"b59c21a078fde074a6750e91ed19fb21";//93a27b0bd99bac3e68a440b48aa421ab 143 [LetsGameAPI instance].appKey = @"f53eb4122d5e2ce81a12093f8f9ce922";//@"b59c21a078fde074a6750e91ed19fb21";//93a27b0bd99bac3e68a440b48aa421ab
133 NSMutableDictionary *payInfo = [NSMutableDictionary dictionary]; 144 NSMutableDictionary *payInfo = [NSMutableDictionary dictionary];
134 [payInfo setValue:@"s1" forKey:@"serverId"]; 145 [payInfo setValue:@"s1" forKey:@"serverId"];
135 [payInfo setValue:@"556553" forKey:@"roleId"]; 146 [payInfo setValue:@"556553" forKey:@"roleId"];
136 [payInfo setValue:@"1002" forKey:@"channelId"]; 147 [payInfo setValue:@"1002" forKey:@"channelId"];
137 [payInfo setValue:@"10" forKey:@"amount"]; 148 [payInfo setValue:@"10" forKey:@"amount"];
138 [payInfo setValue:@"ios demo" forKey:@"extraInfo"]; 149 [payInfo setValue:@"ios demo" forKey:@"extraInfo"];
139 [payInfo setValue:@"wa2" forKey:@"product"]; 150 [payInfo setValue:@"wa2" forKey:@"product"];
140 [payInfo setValue:@"78b83666bd77c1e4c95442140672254d" forKey:@"sessionKey"]; //self.sessionKey 151 [payInfo setValue:@"78b83666bd77c1e4c95442140672254d" forKey:@"sessionKey"]; //self.sessionKey
141 // [[LetsGameAPI instance] pay:payInfo handleCallBack:^{ 152 // [[LetsGameAPI instance] pay:payInfo handleCallBack:^{
142 // NSLog(@"第三方支付完成"); 153 // NSLog(@"第三方支付完成");
143 // }]; 154 // }];
144 [[LetsGameAPI instance] pWeb:payInfo handleCallBack:^{ 155 [[LetsGameAPI instance] pWeb:payInfo handleCallBack:^{
145 NSLog(@"第三方支付完成"); 156 NSLog(@"第三方支付完成");
146 }]; 157 }];
147 } 158 }
148 159
149 -(void)onIapTest{ 160 -(void)onIapTest{
150 161
151 [LetsGameAPI instance].appId = @"10056"; 162 [LetsGameAPI instance].appId = @"10056";
152 [LetsGameAPI instance].appKey = @"b59c21a078fde074a6750e91ed19fb21"; 163 [LetsGameAPI instance].appKey = @"b59c21a078fde074a6750e91ed19fb21";
153 NSMutableDictionary *payInfo = [NSMutableDictionary dictionary]; 164 NSMutableDictionary *payInfo = [NSMutableDictionary dictionary];
154 [payInfo setValue:@"5001" forKey:@"serverId"]; 165 [payInfo setValue:@"5001" forKey:@"serverId"];
155 [payInfo setValue:@"10010" forKey:@"roleId"]; 166 [payInfo setValue:@"10010" forKey:@"roleId"];
156 [payInfo setValue:@"1000" forKey:@"channelId"]; 167 [payInfo setValue:@"1000" forKey:@"channelId"];
157 [payInfo setValue:@"10" forKey:@"amount"]; 168 [payInfo setValue:@"10" forKey:@"amount"];
158 [payInfo setValue:@"ios demo" forKey:@"extraInfo"]; 169 [payInfo setValue:@"ios demo" forKey:@"extraInfo"];
159 [payInfo setValue:@"test.product.1" forKey:@"product"]; 170 [payInfo setValue:@"test.product.1" forKey:@"product"];
160 [[LetsGameAPI instance] iap:payInfo forUser:@"" succCallback:^(NSString *orderId) { 171 [[LetsGameAPI instance] iap:payInfo forUser:@"" succCallback:^(NSString *orderId) {
161 //注意测试仅仅是通知客户端成功,但是还需要向服务器请求验证是否成功,以服务端验证为准 172 //注意测试仅仅是通知客户端成功,但是还需要向服务器请求验证是否成功,以服务端验证为准
162 NSLog(@"IAP completed orderId of Gumptech:%@",orderId); 173 NSLog(@"IAP completed orderId of Gumptech:%@",orderId);
163 } failCallback:^(NSString *orderId) { 174 } failCallback:^(NSString *orderId) {
164 NSLog(@"IAP file orderId of Gumptech:%@",orderId); 175 NSLog(@"IAP file orderId of Gumptech:%@",orderId);
165 }]; 176 }];
166 } 177 }
167 178
168 -(void)onActivity{ 179 -(void)onActivity{
169 180
170 [[LetsGameActivityAPI instance] decideIsDebug:1]; 181 [[LetsGameActivityAPI instance] decideIsDebug:1];
171 // [LetsGameActivityAPI instance].supportLandscape = YES;
172 // [[LetsGameActivityAPI instance] decideAllowRotate:1];
173 NSMutableDictionary *activityInfo = [NSMutableDictionary dictionary]; 182 NSMutableDictionary *activityInfo = [NSMutableDictionary dictionary];
174 [activityInfo setValue:@"100" forKey:@"appId"]; 183 [activityInfo setValue:@"100" forKey:@"appId"];
175 [activityInfo setValue:@"f899139df5e1059396431415e770c6dd" forKey:@"appKey"]; 184 [activityInfo setValue:@"f899139df5e1059396431415e770c6dd" forKey:@"appKey"];
176 [activityInfo setValue:@"123456" forKey:@"userId"]; 185 [activityInfo setValue:@"123456" forKey:@"userId"];
177 [activityInfo setValue:@"111" forKey:@"serverId"]; 186 [activityInfo setValue:@"111" forKey:@"serverId"];
178 [activityInfo setValue:@"aaa" forKey:@"serverName"]; 187 [activityInfo setValue:@"aaa" forKey:@"serverName"];
179 [activityInfo setValue:@"222" forKey:@"roleId"]; 188 [activityInfo setValue:@"222" forKey:@"roleId"];
180 [activityInfo setValue:@"ccc" forKey:@"roleName"]; 189 [activityInfo setValue:@"ccc" forKey:@"roleName"];
181 [activityInfo setValue:@"888" forKey:@"diamond"]; 190 [activityInfo setValue:@"888" forKey:@"diamond"];
191 [activityInfo setValue:self.activityTextField.text forKey:@"campaignType"];
182 [[LetsGameActivityAPI instance] GameActivityWithParaDictory:activityInfo handleCallBackL:^{ 192 [[LetsGameActivityAPI instance] GameActivityWithParaDictory:activityInfo handleCallBackL:^{
183 NSLog(@"activity finish!"); 193 NSLog(@"activity finish!");
184 }]; 194 }];
185 } 195 }
186 196
187 197
188 198