[M] all functional
This commit is contained in:
@@ -218,24 +218,80 @@ extern "C" {
|
||||
|
||||
}
|
||||
|
||||
//广告相关
|
||||
void UnitySetAdBoxUserInfo(char* userId)
|
||||
void LinkGoogle(const int userId)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void UnityInitADSConfig()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void UnityLoadRvADS()
|
||||
{
|
||||
|
||||
NSLog(@"TYSdkInterface LinkGoogle");
|
||||
NSDictionary * userDic = [XYApi XYGetCurrentUserDict];
|
||||
XYBindReq *bindReq = [XYBindReq initBindWithPlatform:XYBindGoodle UserId: [ [userDic objectForKey:@"userId"] unsignedIntegerValue]];
|
||||
[XYApi XYBindByBindReq:bindReq isUnbindGuest:@"false" completionHandler:^(XYResp * _Nonnull resp) {
|
||||
if(resp.errCode == XYSuccess)
|
||||
{
|
||||
NSLog(@"TYSdkInterface LinkGoogle Success");
|
||||
UnitySendMessage("TYSdkFacade","LinkAccoutResult", "1");
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"TYSdkInterface LinkGoogle Faild");
|
||||
UnityLogoutGoogle();
|
||||
UnitySendMessage("TYSdkFacade","LinkAccoutResult", "0");
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
void UnityShowRVAD()
|
||||
void IsLinkedGoogle()
|
||||
{
|
||||
[XYApi CheckUserExist:XYBindGoodle completion:^(XYResp * _Nonnull resp) {
|
||||
if (resp.errCode == XYSNSExist) {
|
||||
UnitySendMessage("TYSdkFacade","CheckLinkResult", "1");
|
||||
}else if (resp.errCode == XYSNSNotExist){
|
||||
UnitySendMessage("TYSdkFacade","CheckLinkResult", "0");
|
||||
} else {
|
||||
UnitySendMessage("TYSdkFacade","CheckLinkResult", "-1");
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
void UnlinkGoogle()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void LinkFacebook(const int userId)
|
||||
{
|
||||
NSLog(@"TYSdkInterface LinkFacebook");
|
||||
NSDictionary * userDic = [XYApi XYGetCurrentUserDict];
|
||||
XYBindReq *bindReq = [XYBindReq initBindWithPlatform:XYBindFB UserId: [ [userDic objectForKey:@"userId"] unsignedIntegerValue]];
|
||||
[XYApi XYBindByBindReq:bindReq isUnbindGuest:@"false" completionHandler:^(XYResp * _Nonnull resp) {
|
||||
if(resp.errCode == XYSuccess)
|
||||
{
|
||||
NSLog(@"TYSdkInterface LinkFacebook Success");
|
||||
UnitySendMessage("TYSdkFacade","LinkAccoutResult", "1");
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"TYSdkInterface LinkFacebook Faild");
|
||||
UnityLogoutFacebook();
|
||||
UnitySendMessage("TYSdkFacade","LinkAccoutResult", "0");
|
||||
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
void IsLinkedFacebook()
|
||||
{
|
||||
[XYApi CheckUserExist:XYBindFB completion:^(XYResp * _Nonnull resp) {
|
||||
if (resp.errCode == XYSNSExist) {
|
||||
UnitySendMessage("TYSdkFacade","CheckLinkResult", "1");
|
||||
}else if (resp.errCode == XYSNSNotExist){
|
||||
UnitySendMessage("TYSdkFacade","CheckLinkResult", "0");
|
||||
} else {
|
||||
UnitySendMessage("TYSdkFacade","CheckLinkResult", "-1");
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
void UnlinkFacebook()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user