2.14 Apple账号绑定R2UID接口
功能说明:
调用该接口可以完成Apple账号与R2 UID的绑定。该接口内部逻辑为先做Apple登录,获取openId,再将该openId与r2UID进行绑定。
接口形式:
-(void)bindAppleFromViewController:(UIViewController*)viewController withR2Uid:(NSString*)r2uid onCompletionHandler:(RNAppleApiCompletionHandler)handler;
参数说明:
viewController:当前活动的UIViewController (必须)
r2Uid : 当前游戏账号对应的R2 UID,用于绑定或者匹配玩家登录的Apple账号(必须)
handler:接口回调 (必须)
接口示例:
NSString *r2uid = @"309494784";
[[RNAppleSignHelper sharedInstance]bindAppleFromViewController:self withR2Uid:r2uid onCompletionHandler:^(int code, NSString * _Nonnull msg, RNLoginResponse * _Nonnull loginResponse, NSDictionary * _Nonnull accoutInfo) {
if (code == 0) {
NSLog(@"Apple ID login and bind r2 account successfully,[%@ %@ ]",accoutInfo,loginResponse.r2Uid);
}else {
NSLog(@"Apple ID login and bind r2 account failed,code = %d,msg = %@",code,msg);
}
}];
Last updated
Was this helpful?