| | |
| | | // 输出⽇志 |
| | | [[YYJPlatform yyj_defaultPlatform]yyj_isShowLog:YES]; |
| | | #endif |
| | | [[YYJPlatform yyj_defaultPlatform] yyj_AppsFlyer_Init:AF_KEY appleAppID:AF_APPLE_APPID]; |
| | | [self initYYJSdk]; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | - (void)YYJPlatformLogin { |
| | | NSLog(@"渠道登录成功"); |
| | | NSString *account = [[YYJPlatform yyj_defaultPlatform] yyj_userUID]; |
| | | NSString *game_id = [[YYJPlatform yyj_defaultPlatform] yyj_gameId]; |
| | | NSString *session_id = [[YYJPlatform yyj_defaultPlatform] yyj_token]; |
| | | |
| | | NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys: |
| | | [NSDictionary dictionaryWithObjectsAndKeys:account, @"account", |
| | | game_id, @"game_id", |
| | | session_id, @"session_id", nil],@"info", |
| | | [NSNumber numberWithInt:S2U_FreePlatformLoginOk], @"code", nil]; |
| | | [self SendMessageToUnity:_dict]; |
| | | |
| | | NSString *regType = [[YYJPlatform yyj_defaultPlatform] yyj_regType]; |
| | | if(regType&&[regType length]!=0){ |
| | | NSLog(@"渠道注册成功"); |
| | | NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys: |
| | | regType, @"reg_type", |
| | | [NSNumber numberWithInt:S2U_FreePlatformRegisterOk], @"code", nil]; |
| | | [self SendMessageToUnity:_dict]; |
| | | }else{ |
| | | NSLog(@"渠道登录成功"); |
| | | NSString *account = [[YYJPlatform yyj_defaultPlatform] yyj_userUID]; |
| | | NSString *game_id = [[YYJPlatform yyj_defaultPlatform] yyj_gameId]; |
| | | NSString *session_id = [[YYJPlatform yyj_defaultPlatform] yyj_token]; |
| | | |
| | | NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys: |
| | | [NSDictionary dictionaryWithObjectsAndKeys:account, @"account", |
| | | game_id, @"game_id", |
| | | session_id, @"session_id", nil],@"info", |
| | | [NSNumber numberWithInt:S2U_FreePlatformLoginOk], @"code", nil]; |
| | | [self SendMessageToUnity:_dict]; |
| | | } |
| | | [[YYJPlatform yyj_defaultPlatform]yyj_showFloatWindow]; //显示悬浮窗 |
| | | } |
| | | |