commit | author | age
|
dcdc07
|
1 |
// |
W |
2 |
// WACoreProxy.h |
|
3 |
// WASdkIntfUI |
|
4 |
// |
|
5 |
// Created by wuyx on 16/3/1. |
|
6 |
// Copyright © 2016年 GHW-T-01. All rights reserved. |
|
7 |
// |
|
8 |
|
|
9 |
#import <Foundation/Foundation.h> |
|
10 |
#import "WACore.h" |
537198
|
11 |
#import "WAIPush.h" |
dcdc07
|
12 |
@class WACoreProxy; |
W |
13 |
|
|
14 |
#define WALog(fmt,...) {\ |
|
15 |
if([WACoreProxy displayLog]){\ |
|
16 |
NSLog((@"WASDK LOG [(version %@) %s ]:" fmt), [WACoreProxy getSdkVer],__FUNCTION__, ##__VA_ARGS__);\ |
|
17 |
[WACoreProxy addLogWithString:[NSString stringWithFormat:(@"(version %@) %s ]:" fmt),[WACoreProxy getSdkVer],__FUNCTION__, ##__VA_ARGS__]];\ |
|
18 |
}\ |
|
19 |
} |
|
20 |
|
|
21 |
#define WALogNb(fmt,...) {\ |
|
22 |
if([WACoreProxy displayLog]){\ |
|
23 |
NSLog((@"WASDK LOG [(version %@) %s ]:" fmt), [WACoreProxy getSdkVer],__FUNCTION__, ##__VA_ARGS__);\ |
|
24 |
[WACoreProxy addLogWithString:[NSString stringWithFormat:(@"(version %@) %s ]:" fmt),[WACoreProxy getSdkVer],__FUNCTION__, ##__VA_ARGS__]];\ |
|
25 |
}\ |
|
26 |
} |
|
27 |
|
|
28 |
#define WALogImpt(fmt,...) {\ |
|
29 |
NSLog((@"WASDK LOG [(version %@) %s ]:" fmt), [WACoreProxy getSdkVer],__FUNCTION__, ##__VA_ARGS__);\ |
|
30 |
if([WACoreProxy isDebugMode]){\ |
|
31 |
[WACoreProxy addLogWithString:[NSString stringWithFormat:(@"(version %@) %s ]:" fmt),[WACoreProxy getSdkVer],__FUNCTION__, ##__VA_ARGS__]];\ |
|
32 |
}\ |
|
33 |
} |
|
34 |
|
|
35 |
#define WAEventLog(fmt,...) {\ |
|
36 |
if([WACoreProxy displayLog]){\ |
|
37 |
NSLog((@"WASDK LOG [(version %@) %s ]:" fmt), [WACoreProxy getSdkVer],__FUNCTION__, ##__VA_ARGS__);\ |
|
38 |
[WACoreProxy addEventContentWithString:[NSString stringWithFormat:(@"" fmt),##__VA_ARGS__]];\ |
|
39 |
}\ |
|
40 |
} |
|
41 |
/*! |
|
42 |
@discussion WACoreProxy |
|
43 |
- - - |
|
44 |
*/ |
|
45 |
@interface WACoreProxy : NSObject |
|
46 |
/*! |
|
47 |
@abstract 初始化 |
|
48 |
*/ |
|
49 |
+(void)init; |
0ac0a6
|
50 |
|
L |
51 |
|
|
52 |
/*! |
|
53 |
@abstract 初始化(20221202新增初始化回调) |
|
54 |
*/ |
|
55 |
|
|
56 |
+(void)initWithCompletionHandler:(void (^_Nullable)())completionHandler; |
|
57 |
|
|
58 |
|
dcdc07
|
59 |
/*! |
W |
60 |
@abstract 设置sdk类型 0 国外,1 国内 |
|
61 |
*/ |
|
62 |
+ (void)setSDKType:(NSInteger)sdkType; |
|
63 |
/*! |
|
64 |
@abstract 获取sdk类型 0 国外,1 国内 |
|
65 |
*/ |
|
66 |
+ (NSInteger)getSDKType; |
|
67 |
/*! |
|
68 |
@abstract 开启数据收集 |
|
69 |
*/ |
|
70 |
+(void)initAppEventTracker; |
|
71 |
/*! |
|
72 |
@abstract 是否调试模式 |
|
73 |
*/ |
|
74 |
+(BOOL)isDebugMode; |
|
75 |
/*! |
|
76 |
@abstract 设置调试模式 |
|
77 |
*/ |
|
78 |
+(void)setDebugMode:(BOOL)isDebugMode; |
|
79 |
|
|
80 |
/*! |
|
81 |
@abstract 是否显示Log按钮 |
|
82 |
*/ |
|
83 |
+(BOOL)displayLog; |
962836
|
84 |
/*! |
W |
85 |
@abstract 设置clientId |
|
86 |
*/ |
|
87 |
+(void)setClientId:(NSString*)clientId; |
dcdc07
|
88 |
/*! |
W |
89 |
@abstract 获取userId |
|
90 |
*/ |
|
91 |
+(NSString*)getUserId; |
|
92 |
/*! |
|
93 |
@abstract 设置serverId |
962836
|
94 |
@param serverId 服务器id |
dcdc07
|
95 |
*/ |
W |
96 |
+(void)setServerId:(NSString *)serverId; |
|
97 |
/*! |
|
98 |
@abstract 获取serverId |
|
99 |
*/ |
|
100 |
|
|
101 |
+(NSString*)getServerId; |
|
102 |
/*! |
|
103 |
@abstract 设置level |
962836
|
104 |
@param level 等级 |
dcdc07
|
105 |
*/ |
W |
106 |
+(void)setLevel:(int)level; |
|
107 |
/*! |
|
108 |
@abstract 获取level |
|
109 |
*/ |
|
110 |
+(int)getLevel; |
|
111 |
/*! |
|
112 |
@abstract 设置gameUserId |
962836
|
113 |
@param gameUserId 游戏userId |
dcdc07
|
114 |
*/ |
W |
115 |
+(void)setGameUserId:(NSString*)gameUserId; |
|
116 |
/*! |
|
117 |
@abstract 获取gameUserId |
|
118 |
*/ |
|
119 |
+(NSString*)getGameUserId; |
|
120 |
/*! |
6988c5
|
121 |
@abstract 设置nickName |
H |
122 |
@param nickName 游戏角色名 |
|
123 |
*/ |
|
124 |
+(void)setNickName:(NSString*)nickName; |
|
125 |
/*! |
|
126 |
@abstract 获取nickName |
|
127 |
*/ |
|
128 |
+(NSString*)getNickName; |
|
129 |
/*! |
ff1ee0
|
130 |
@abstract 获取userFlag |
H |
131 |
*/ |
|
132 |
+(void)setUserFlag:(NSString*)userFlag; |
|
133 |
/*! |
|
134 |
@abstract 获取userFlag |
|
135 |
*/ |
|
136 |
+(NSString*)getUserFlag; |
|
137 |
/*! |
dcdc07
|
138 |
@abstract 获取WA Server url |
W |
139 |
*/ |
|
140 |
+(NSString*)getWaSdkServerUrl; |
|
141 |
/*! |
|
142 |
@abstract 获取appKey |
|
143 |
*/ |
|
144 |
+(NSString*)getAppKey; |
|
145 |
/*! |
|
146 |
@abstract 获取Publish Channel |
|
147 |
*/ |
|
148 |
+(NSString*)getPublishChannel; |
|
149 |
/*! |
|
150 |
@abstract 获取Channel |
|
151 |
*/ |
|
152 |
+(NSString*)getChannel; |
|
153 |
/*! |
|
154 |
@abstract 获取appId |
|
155 |
*/ |
|
156 |
+(NSString*)getAppID; |
|
157 |
/*! |
|
158 |
@abstract 获取os |
|
159 |
*/ |
|
160 |
+(NSString*)getOS; |
|
161 |
/*! |
|
162 |
@abstract 获取SDK版本 |
|
163 |
*/ |
|
164 |
+(NSString*)getSdkVer; |
|
165 |
/*! |
|
166 |
@abstract 获取SDK ID |
|
167 |
*/ |
|
168 |
+(NSString *)getSdkId; |
|
169 |
/*! |
|
170 |
@abstract 获取配置文件版本 |
|
171 |
*/ |
|
172 |
+(NSString*)getXmlConfigVer; |
|
173 |
/*! |
|
174 |
@abstract 获取抽象层版本 |
|
175 |
*/ |
|
176 |
+(NSString*)getIntfVer; |
|
177 |
/*! |
|
178 |
@abstract 获取SessionId |
|
179 |
*/ |
|
180 |
+(NSString*)getSessionId; |
|
181 |
/*! |
34827e
|
182 |
@abstract 隐私政策URL地址 |
H |
183 |
*/ |
|
184 |
+(NSString *)getPrivacyUrl; |
|
185 |
/*! |
|
186 |
@abstract 隐私政策更新时间 |
|
187 |
*/ |
|
188 |
+(NSString *)getPrivacyUpdateTime; |
|
189 |
/*! |
|
190 |
@abstract 隐私政策内容界面 |
|
191 |
*/ |
99a8fe
|
192 |
+(void)showPrivacyUI:(void(^)(void))privacyUIClosedHandler; |
79188b
|
193 |
+(void)showPrivacyUITitle:(NSString*)title url:(NSString*)url handle:(void(^)(void))privacyUIClosedHandler; |
L |
194 |
|
34827e
|
195 |
/*! |
dcdc07
|
196 |
@abstract 下面两个方法是关于Facebook deeplink, CP不用关注 |
W |
197 |
*/ |
|
198 |
-(NSString*)getDeepLinkWithUrl:(NSURL*)url; |
|
199 |
|
|
200 |
+(void)fetchDeferredAppLink:(void(^)(NSURL *url, NSError *error))handler; |
|
201 |
/*! |
cf3302
|
202 |
@abstract 获取后台配置参数 |
H |
203 |
*/ |
|
204 |
+(WAParamConfigObj*)getParamConfig; |
|
205 |
/*! |
dcdc07
|
206 |
@abstract 下面四个方法是关于打印日志的,CP不用关注 |
W |
207 |
*/ |
|
208 |
+(void)addLogWithString:(NSString*)string; |
|
209 |
|
|
210 |
+(void)addLogWithoutBtn:(NSString*)string; |
|
211 |
|
|
212 |
+(void)addEventContentWithString:(NSString*)string; |
|
213 |
|
|
214 |
+(void)eventLogWithPlatform:(NSString*)platform eventName:(NSString*)eventName parameters:(NSDictionary*)parameters color:(UIColor*)color; |
|
215 |
|
537198
|
216 |
/*! |
H |
217 |
@discussion 处理UIApplicationDelegate的方法[-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions]传递过来的参数。 |
|
218 |
*/ |
|
219 |
+ (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; |
dcdc07
|
220 |
|
537198
|
221 |
#pragma mark 消息通知 |
aea85e
|
222 |
/*! |
H |
223 |
@abstract 注册通知 |
|
224 |
*/ |
99a8fe
|
225 |
+ (void)application:(UIApplication *)application initPushWithDelegate:(id<UNUserNotificationCenterDelegate>)delegate API_AVAILABLE(ios(10.0)); |
537198
|
226 |
|
aea85e
|
227 |
/*! |
H |
228 |
@abstract 调用过用户注册通知方法之后执行 |
|
229 |
*/ |
99a8fe
|
230 |
+ (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings API_AVAILABLE(ios(8.0)); |
537198
|
231 |
|
aea85e
|
232 |
/*! |
H |
233 |
@abstract 获取deviceToken |
|
234 |
*/ |
537198
|
235 |
+ (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken; |
H |
236 |
|
aea85e
|
237 |
/*! |
H |
238 |
@abstract 注册失败 |
|
239 |
*/ |
537198
|
240 |
+ (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error; |
H |
241 |
|
|
242 |
#pragma mark IOS8 IOS9 Push Notification Receive |
aea85e
|
243 |
/*! |
H |
244 |
@abstract 接收本地通知 |
|
245 |
*/ |
537198
|
246 |
+ (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification; |
aea85e
|
247 |
|
H |
248 |
/*! |
|
249 |
@abstract 接收远程通知 |
|
250 |
*/ |
537198
|
251 |
+ (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler; |
H |
252 |
|
|
253 |
#pragma mark IOS10 Push Notification Receive |
aea85e
|
254 |
/*! |
H |
255 |
@abstractApp 处于前台接收通知时 |
|
256 |
*/ |
99a8fe
|
257 |
+ (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler API_AVAILABLE(ios(10.0)) API_AVAILABLE(ios(10.0)) API_AVAILABLE(ios(10.0)); |
537198
|
258 |
|
aea85e
|
259 |
/*! |
H |
260 |
@abstract 通知的点击事件 |
|
261 |
*/ |
99a8fe
|
262 |
+ (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)(void))completionHandler API_AVAILABLE(ios(10.0)) API_AVAILABLE(ios(10.0)); |
537198
|
263 |
|
H |
264 |
/*! |
|
265 |
程序进入后台 |
|
266 |
@discussion 处理UIApplicationDelegate的方法[- (void)applicationDidEnterBackground:(UIApplication *)application]传递过来的参数。 |
|
267 |
*/ |
|
268 |
+ (void)applicationDidEnterBackground:(UIApplication *)application; |
|
269 |
|
|
270 |
/*! |
|
271 |
程序将进入前台 |
|
272 |
@discussion 处理UIApplicationDelegate的方法[- (void)applicationWillEnterForeground:(UIApplication *)application]传递过来的参数。 |
|
273 |
*/ |
|
274 |
+ (void)applicationWillEnterForeground:(UIApplication *)application; |
|
275 |
|
|
276 |
/*! |
|
277 |
程序进入前台 |
|
278 |
@discussion 处理UIApplicationDelegate的方法[- (void)applicationDidBecomeActive:(UIApplication *)application]传递过来的参数。 |
|
279 |
*/ |
|
280 |
+ (void)applicationDidBecomeActive:(UIApplication *)application; |
|
281 |
|
|
282 |
/*! |
|
283 |
@discussion 处理UIApplicationDelegate的方法[-(BOOL)application:(UIApplication *)application |
|
284 |
openURL:(NSURL *)url |
|
285 |
sourceApplication:(NSString *)sourceApplication |
|
286 |
annotation:(id)annotation]传递过来的参数。 |
|
287 |
*/ |
|
288 |
+ (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation; |
dcdc07
|
289 |
|
34827e
|
290 |
+ (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options; |
H |
291 |
|
99a8fe
|
292 |
+ (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler API_AVAILABLE(ios(8.0)); |
aea85e
|
293 |
|
d814a6
|
294 |
//当一个新的场景被创建时调用,可以在这个方法中配置场景。 |
L |
295 |
+ (void)scene:(UIScene *_Nonnull)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *_Nonnull)connectionOptions API_AVAILABLE(ios(13.0)); |
|
296 |
// 当场景被销毁时调用。 |
|
297 |
+ (void)sceneDidDisconnect:(UIScene *_Nonnull)scene API_AVAILABLE(ios(13.0)); |
|
298 |
//当场景变成活跃状态时调用。 |
|
299 |
+ (void)sceneDidBecomeActive:(UIScene *_Nonnull)scene API_AVAILABLE(ios(13.0)); |
|
300 |
//当场景将要变成非活跃状态时调用。 |
|
301 |
+ (void)sceneWillResignActive:(UIScene *_Nonnull)scene API_AVAILABLE(ios(13.0)); |
|
302 |
//当应用程序即将进入前台时调用。 |
|
303 |
+ (void)sceneWillEnterForeground:(UIScene *_Nonnull)scene API_AVAILABLE(ios(13.0)); |
|
304 |
//当应用程序进入后台时调用。 |
|
305 |
+ (void)sceneDidEnterBackground:(UIScene *_Nonnull)scene API_AVAILABLE(ios(13.0)); |
|
306 |
//当别的APP通过URL地址,打开我们的app时调用 |
|
307 |
+ (void)scene:(UIScene *_Nonnull)scene openURLContexts:(NSSet<UIOpenURLContext *> *_Nonnull)URLContexts API_AVAILABLE(ios(13.0)); |
|
308 |
+ (void)scene:(UIScene *)scene continueUserActivity:(NSUserActivity *)userActivity API_AVAILABLE(ios(13.0)); |
|
309 |
|
aea85e
|
310 |
/*! |
H |
311 |
@abstract 设备是否越狱 |
|
312 |
*/ |
|
313 |
+ (BOOL)isJailBreak; |
|
314 |
|
1ac090
|
315 |
|
L |
316 |
|
dcdc07
|
317 |
@end |