-
Notifications
You must be signed in to change notification settings - Fork 0
/
MergedUnityAppController.mm
65 lines (45 loc) · 1.85 KB
/
MergedUnityAppController.mm
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
#import <Foundation/Foundation.h>
#import "Tune.h"
#import "UnityAppController.h"
#import <Megacool/Megacool.h>
@interface MergedUnityAppController : UnityAppController
@end
@implementation MergedUnityAppController : UnityAppController
- (void)application:(UIApplication *)application
handleEventsForBackgroundURLSession:(NSString *)identifier
completionHandler:(void (^)())completionHandler {
[[Megacool sharedMegacool]
handleEventsForBackgroundURLSession:identifier
completionHandler:completionHandler];
}
- (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray *))restorationHandler {
if ([[Megacool sharedMegacool] continueUserActivity:userActivity]) {
return YES;
}
return [Tune handleContinueUserActivity:userActivity
restorationHandler:restorationHandler];
}
- (BOOL) application:(UIApplication *)application
openURL:(nonnull NSURL *)url
sourceApplication:(nullable NSString *)sourceApplication
annotation:(nonnull id)annotation {
[[Megacool sharedMegacool] openURL:url sourceApplication:sourceApplication];
[Tune handleOpenURL:url sourceApplication:sourceApplication];
return [super application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation];
}
- (BOOL)application:(UIApplication *)app
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
[[Megacool sharedMegacool] openURL:url options:options];
[Tune handleOpenURL:url options:options];
return [super application:app
openURL:url
options:options];
}
@end
IMPL_APP_CONTROLLER_SUBCLASS(MergedUnityAppController)