少年修仙传客户端基础资源
Assets/Plugins/iOS/The2thWorldSDK/UniversalSDK.mm
@@ -15,6 +15,7 @@
#import <UserNotifications/UserNotifications.h>
#endif
#import "SystemConfiguration/CaptiveNetwork.h"
#import <TTTracker/TTTracker+Game.h>
@interface UniversalSDK()<JPUSHRegisterDelegate>
@end
@@ -81,6 +82,9 @@
    
    // 热云初始化
    [Tracking initWithAppKey:@"3c3724431309474be938e0b64d4ad74f" withChannelId:@"_default_"];
    // 今日头条
    [TTTracker startWithAppID:@"151709" channel:@"ios-snqxz" appName:@"少年奇侠传"];
    
    // 发送初始化完成
    [_dict removeAllObjects];
@@ -184,6 +188,8 @@
    [self SendMessageToUnity:_dict];
    
    [Tracking setRegisterWithAccountID:_account.identifier];
    [TTTracker registerEventByMethod:@"freesdk" isSuccess:YES];
}
-(void) FreeSDKLoginOK
@@ -362,6 +368,12 @@
                [FreeSDK logout];
            }
            [FreeSDK presentLoginDialog:nil];
            NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
                                   [NSNumber numberWithInt:S2U_FreePlatformLogoutOk], @"code", nil];
            [self SendMessageToUnity:_dict];
            break;
        }
        case U2S_FreePlatformPay:
@@ -375,6 +387,23 @@
            [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)
            {