File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
iOS_SDK/OneSignalDevApp/OneSignalDevApp Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
7777 [OneSignal addSubscriptionObserver: self ];
7878 [OneSignal addEmailSubscriptionObserver: self ];
7979
80- [OneSignal setInFocusNotificationDisplayTypeDelegate :self ];
80+ [OneSignal setNotificationDisplayTypeDelegate :self ];
8181
8282 NSLog (@" UNUserNotificationCenter.delegate: %@ " , UNUserNotificationCenter .currentNotificationCenter .delegate );
8383
@@ -99,11 +99,13 @@ -(void)onOSEmailSubscriptionChanged:(OSEmailSubscriptionStateChanges *)stateChan
9999
100100}
101101
102- - (void )willPresentInFocusNotificationWithPayload : (OSNotificationPayload *)payload forDisplayType : (OSNotificationDisplayType *) type {
102+ - (void )willPresentInFocusNotificationWithPayload : (OSNotificationPayload *)payload withDefaultDisplayType : (OSNotificationDisplayType) displayType withCompletion : (OSNotificationDisplayTypeResponse) completion {
103103 if (payload.additionalData [@" overrideDisplayType" ]) {
104- OSNotificationDisplayType newType = (OSNotificationDisplayType)[payload.additionalData[@" displayType " ] intValue ];
104+ OSNotificationDisplayType newType = (OSNotificationDisplayType)[payload.additionalData[@" overrideDisplayType " ] intValue ];
105105
106- *type = newType;
106+ completion (newType);
107+ } else {
108+ completion (displayType);
107109 }
108110}
109111
You can’t perform that action at this time.
0 commit comments