com.onesignal.unity.ios 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -71,6 +71,8 @@ typedef void (*ClickListenerDelegate)(const char* notification, const char* resu
|
|
|
71
71
|
[OneSignal.Notifications addPermissionObserver:self];
|
|
72
72
|
[OneSignal.Notifications addForegroundLifecycleListener:self];
|
|
73
73
|
[OneSignal.Notifications addClickListener:self];
|
|
74
|
+
|
|
75
|
+
_willDisplayEvents = [NSMutableDictionary new];
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
return self;
|
|
@@ -84,10 +86,10 @@ typedef void (*ClickListenerDelegate)(const char* notification, const char* resu
|
|
|
84
86
|
|
|
85
87
|
- (void)onWillDisplayNotification:(OSNotificationWillDisplayEvent *)event {
|
|
86
88
|
if (_willDisplayDelegate != nil) {
|
|
89
|
+
_willDisplayEvents[event.notification.notificationId] = event;
|
|
90
|
+
|
|
87
91
|
NSString *stringNotification = [event.notification stringify];
|
|
88
92
|
_willDisplayDelegate([stringNotification UTF8String]);
|
|
89
|
-
|
|
90
|
-
_willDisplayEvents[event.notification.notificationId] = event;
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
|
|
@@ -96,7 +96,7 @@ static bool swizzled = false;
|
|
|
96
96
|
|
|
97
97
|
- (BOOL)oneSignalApplication:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
|
98
98
|
[OneSignalWrapper setSdkType:@"unity"];
|
|
99
|
-
[OneSignalWrapper setSdkVersion:@"
|
|
99
|
+
[OneSignalWrapper setSdkVersion:@"050002"];
|
|
100
100
|
[OneSignal setLaunchOptions:launchOptions];
|
|
101
101
|
|
|
102
102
|
if ([self respondsToSelector:@selector(oneSignalApplication:didFinishLaunchingWithOptions:)])
|
|
@@ -114,7 +114,7 @@ namespace OneSignalSDK.iOS.Notifications {
|
|
|
114
114
|
{
|
|
115
115
|
// We use Send instead of Post because we need to *not* return to our caller until the
|
|
116
116
|
// event handlers have returned themselves. This allows a handler to call PreventDefault()
|
|
117
|
-
// which will get passed down to
|
|
117
|
+
// which will get passed down to iOS in InternalNotificationWillDisplayEventArgs.
|
|
118
118
|
UnityMainThreadDispatch.Send(state => handler(_instance, args));
|
|
119
119
|
}
|
|
120
120
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "com.onesignal.unity.ios",
|
|
3
3
|
"displayName": "OneSignal Unity SDK - iOS",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.2",
|
|
5
5
|
"unity": "2018.4",
|
|
6
6
|
"description": "OneSignal is the market leader in customer engagement, powering mobile push, web push, email, and in-app messages.",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"com.onesignal.unity.core": "5.0.
|
|
8
|
+
"com.onesignal.unity.core": "5.0.2"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [
|
|
11
11
|
"push-notifications",
|