hch
4 天以前 e8d63e91d80cc59d7947ad026149c2b752ce9364
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//
//  UniversalSDK.h
//  Unity-iPhone
//
//  Created by 蔡瀚 on 2018/4/24.
//
 
#ifndef __UNIVERSALSDK_H_
#define __UNIVERSALSDK_H_
 
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
 
#define UNITY_OBJ_NAME "SDKUtility"
#define UNITY_FUNC_NAME "HandleSdkMessage"
 
#define PRODUCT_CODE    @"94279765784164379223647584858028"
#define PRODUCT_KEY     @"44542109"
 
#define S2U_BatteryLevel                1
#define S2U_BatteryCharging             2
#define S2U_DeviceInfo                  3
#define S2U_PushClientID                4
#define S2U_FreePlatformInitOk          10
#define S2U_FreePlatformInitFail        11
#define S2U_FreePlatformLoginOk         12
#define S2U_FreePlatformLoginFail       13
#define S2U_FreePlatformLoginCancel     14
#define S2U_FreePlatformLogoutOk        15
#define S2U_FreePlatformLogoutFail      16
#define S2U_FreePlatformSwitchAccountOk 17
#define S2U_FreePlatformPayOk           18
#define S2U_FreePlatformPayFail         19
#define S2U_FreePlatformPayCancel       20
#define S2U_FreePlatformRegisterOk      21
#define S2U_SdkInitComplete             90
 
#define U2S_BatteryListenStart          1
#define U2S_BatteryListenStop           2
#define U2S_CopyContent                 7
#define U2S_OpenWebView                 8
#define U2S_Init                        9
#define U2S_FreePlatformInit            100
#define U2S_FreePlatformLogin           101
#define U2S_FreePlatformLogout          102
#define U2S_FreePlatformSwitchAccount   103
#define U2S_FreePlatformPay             104
#define U2S_PayFinished                 105
#define U2S_CreateRole                  106
#define U2S_RoleLogin                   107
#define U2S_RoleLevelUp                 108
#define U2S_JPushAddLocalMessage        200
#define U2S_JPushRemoveLocalMessage     201
#define U2S_MakeKeyAndVisible           300
#define U2S_SendRegistEvent             500
#define U2S_SendLoginEvent              600
 
#define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
 
static BOOL     JPush_IsProduction = FALSE;
 
@interface UniversalSDK : NSObject {
    UIWebView* m_UIWebView;
    UIButton* m_CloseBtn;
}
 
-(void) HandleUnityMessage:(NSString*) json;
-(void) Init;
-(id) APNativeJSONObject:(NSData*) data;
-(NSData*) APNativeJSONData:(id) obj;
-(void) RemoveLocalNotificationWithIdentifierKey:(NSString*) idKey;
 
-(void) QuickSDKInit:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
 
@end
 
#endif