| | |
| | |
|
| | | -(void) Init
|
| | | {
|
| | | // --------------------- 初始化 --------------------------
|
| | | SMPCQuickSDKInitConfigure *cfg = [[SMPCQuickSDKInitConfigure alloc] init];
|
| | | cfg.productKey = PRODUCT_KEY;
|
| | | cfg.productCode = PRODUCT_CODE;
|
| | | [[SMPCQuickSDK defaultInstance] initWithConfig:cfg application:application didFinishLaunchingWithOptions:launchOptions];
|
| | | // ------------------------------------------------------
|
| | | |
| | | UIDevice *_device = [UIDevice currentDevice];
|
| | | _device.batteryMonitoringEnabled = true;
|
| | |
|
| | |
| | | _userAgent,@"userAgent",nil];
|
| | | [self SendMessageToUnity:_dict];
|
| | | }];
|
| | | |
| | | NSString *_appid = sAppID;
|
| | | NSLog(@"init _appid:%@",_appid);
|
| | | |
| | | NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
|
| | | [NSNumber numberWithInt:S2U_SdkInitComplete], @"code",
|
| | | @"hygame", @"channelPlatform",
|
| | | _appid, @"yj_appid", _appid, @"yj_spid", nil];
|
| | | [self SendMessageToUnity:_dict];
|
| | | }
|
| | |
|
| | | -(void)SendMessageToUnity:(NSDictionary*)dict
|
| | |
| | | // 监听充值结果
|
| | | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(smpcQpRechargeResult:) name:kSmpcQuickSDKNotiRecharge object:nil];
|
| | |
|
| | |
|
| | | // --------------------- 初始化 --------------------------
|
| | | SMPCQuickSDKInitConfigure *cfg = [[SMPCQuickSDKInitConfigure alloc] init];
|
| | | cfg.productKey = PRODUCT_KEY;
|
| | | cfg.productCode = PRODUCT_CODE;
|
| | | [[SMPCQuickSDK defaultInstance] initWithConfig:cfg application:application didFinishLaunchingWithOptions:launchOptions];
|
| | | // ------------------------------------------------------
|
| | | }
|
| | |
|
| | | - (void)smpcQpInitResult:(NSNotification *)notify {
|
| | |
| | | // {
|
| | | // _appid = sAppID;
|
| | | // }
|
| | | NSString *_appid = sAppID;
|
| | | NSLog(@"init _appid:%@",_appid);
|
| | |
|
| | | NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
|
| | | [NSNumber numberWithInt:S2U_SdkInitComplete], @"code",
|
| | | @"hygame", @"channelPlatform",
|
| | | _appid, @"yj_appid", _appid, @"yj_spid", nil];
|
| | | [self SendMessageToUnity:_dict];
|
| | | }
|
| | | break;
|
| | | case SMPC_QUICK_SDK_ERROR_INIT_FAILED:
|