| | |
| | | #import <UserNotifications/UserNotifications.h> |
| | | #endif |
| | | #import "SystemConfiguration/CaptiveNetwork.h" |
| | | #import <TTTracker/TTTracker+Game.h> |
| | | |
| | | @interface UniversalSDK()<JPUSHRegisterDelegate> |
| | | @end |
| | |
| | | |
| | | // 热云初始化 |
| | | [Tracking initWithAppKey:@"3c3724431309474be938e0b64d4ad74f" withChannelId:@"_default_"]; |
| | | |
| | | // 今日头条 |
| | | [TTTracker startWithAppID:@"151709" channel:@"ios-snqxz" appName:@"少年奇侠传"]; |
| | | |
| | | // 发送初始化完成 |
| | | [_dict removeAllObjects]; |
| | |
| | | [self SendMessageToUnity:_dict]; |
| | | |
| | | [Tracking setRegisterWithAccountID:_account.identifier]; |
| | | |
| | | [TTTracker registerEventByMethod:@"freesdk" isSuccess:YES]; |
| | | } |
| | | |
| | | -(void) FreeSDKLoginOK |
| | |
| | | [FreeSDK logout]; |
| | | } |
| | | [FreeSDK presentLoginDialog:nil]; |
| | | |
| | | NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys: |
| | | [NSNumber numberWithInt:S2U_FreePlatformLogoutOk], @"code", nil]; |
| | | |
| | | [self SendMessageToUnity:_dict]; |
| | | |
| | | break; |
| | | } |
| | | case U2S_FreePlatformPay: |
| | |
| | | [FreeSDK pay:_order]; |
| | | } |
| | | break; |
| | | case U2S_PayFinished: |
| | | { |
| | | [Tracking setRyzf:[_dict objectForKey:@"orderID"] |
| | | ryzfType:@"freesdk" |
| | | hbType:[_dict objectForKey:@"moneyType"] |
| | | hbAmount:[[_dict objectForKey:@"money"] floatValue]]; |
| | | |
| | | [TTTracker purchaseEventWithContentType:@"" |
| | | contentName:@"" |
| | | contentID:@"" |
| | | contentNumber:1 |
| | | paymentChannel:@"freesdk" |
| | | currency:[_dict objectForKey:@"moneyType"] |
| | | currency_amount:[[_dict objectForKey:@"money"] intValue] |
| | | isSuccess:YES]; |
| | | } |
| | | break; |
| | | case U2S_BatteryListenStart: |
| | | if(_thread == NULL) |
| | | { |