// 
 | 
//  UniversalSDK.h 
 | 
//  Unity-iPhone 
 | 
// 
 | 
//  Created by 蔡瀚 on 2018/4/24. 
 | 
// 
 | 
  
 | 
#ifndef __UNIVERSALSDK_H_ 
 | 
#define __UNIVERSALSDK_H_ 
 | 
  
 | 
#import <Foundation/Foundation.h> 
 | 
#import <UIKit/UIKit.h> 
 | 
#import <WebKit/WebKit.h> 
 | 
#import <SohaSDK/Soha.h> 
 | 
  
 | 
#define UNITY_OBJ_NAME "SDKUtility" 
 | 
#define UNITY_FUNC_NAME "HandleSdkMessage" 
 | 
  
 | 
  
 | 
#define S2U_BatteryLevel                1 
 | 
#define S2U_BatteryCharging             2 
 | 
#define S2U_SdkInitComplete             3 
 | 
#define S2U_DeviceInfo                  4 
 | 
#define S2U_PushClientID                5 
 | 
#define S2U_FreePlatformInitOk          100 
 | 
#define S2U_FreePlatformInitFail        101 
 | 
#define S2U_FreePlatformLoginOk         102 
 | 
#define S2U_FreePlatformLoginFail       103 
 | 
#define S2U_FreePlatformLoginCancel     104 
 | 
#define S2U_FreePlatformLogoutOk        105 
 | 
#define S2U_FreePlatformLogoutFail      106 
 | 
#define S2U_FreePlatformSwitchAccountOk 107 
 | 
#define S2U_FreePlatformPayOk           108 
 | 
#define S2U_FreePlatformPayFail         109 
 | 
#define S2U_FreePlatformPayCancel       110 
 | 
#define S2U_FreePlatformRegisterOk      111 
 | 
#define S2U_ShareCallBack               112 
 | 
#define S2U_ReviewCallBack              113 
 | 
#define S2U_OrderInfoCallBack           114 
 | 
#define S2U_DelAccount                  115 
 | 
  
 | 
  
 | 
#define U2S_BatteryListenStart          1 
 | 
#define U2S_BatteryListenStop           2 
 | 
#define U2S_CopyContent                 7 
 | 
#define U2S_OpenWebView                 8 
 | 
#define U2S_Init                        9 
 | 
#define U2S_GoToAppStore                13 
 | 
#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_ShareToFaceBook             112 
 | 
#define U2S_GoToReview                  113 
 | 
#define U2S_ShowAccountView             114 
 | 
#define U2S_CompleteTutorial            115 
 | 
#define U2S_CloseVote                   116 
 | 
#define U2S_DelAccount                  117 
 | 
#define U2S_OpenDashboard               118 
 | 
#define U2S_JPushAddLocalMessage        200 
 | 
#define U2S_JPushRemoveLocalMessage     201 
 | 
#define U2S_MakeKeyAndVisible           300 
 | 
#define U2S_SendRegistEvent             500 
 | 
#define U2S_SendLoginEvent              600 
 | 
#define U2S_AFTrackEvent                1000 
 | 
  
 | 
  
 | 
#define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO) 
 | 
  
 | 
  
 | 
@interface UniversalSDK :  NSObject<WKUIDelegate, WKNavigationDelegate, SohaDelegate, UNUserNotificationCenterDelegate> { 
 | 
    WKWebView* m_UIWebView; 
 | 
    WKWebView* m_fakeUIWebView; 
 | 
    UIButton* m_CloseBtn; 
 | 
} 
 | 
  
 | 
-(void) HandleUnityMessage:(NSString*) json; 
 | 
-(void) Init; 
 | 
-(id) APNativeJSONObject:(NSData*) data; 
 | 
  
 | 
-(void) QuickSDKInit:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; 
 | 
  
 | 
@end 
 | 
  
 | 
#endif 
 |