File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -547,7 +547,7 @@ + (void)setNotificationDisplayOptions:(NSNumber*)option {
547547
548548 // Special Case: If iOS version < 10 && Option passed is 2, default to inAppAlerts.
549549 NSInteger op = option.integerValue ;
550- if (![OneSignalHelper isiOS10Plus ] && OSNotificationDisplayTypeNotification == op)
550+ if (![OneSignalHelper isiOS10Plus ] && OSNotificationDisplayTypeNotification == op)
551551 op = OSNotificationDisplayTypeInAppAlert;
552552
553553 [[NSUserDefaults standardUserDefaults ] setObject: @(op) forKey: @" ONESIGNAL_ALERT_OPTION" ];
@@ -884,6 +884,9 @@ + (void)sendPurchases:(NSArray*)purchases {
884884// - 2A. iOS 9 - Notification received while app is in focus.
885885// - 2B. iOS 10 - Notification received/displayed while app is in focus.
886886+ (void )notificationOpened : (NSDictionary *)messageDict isActive : (BOOL )isActive {
887+ if (!app_id)
888+ return ;
889+
887890 onesignal_Log (ONE_S_LL_VERBOSE, @" notificationOpened:isActive called!" );
888891
889892 NSDictionary * customDict = [messageDict objectForKey: @" os_data" ];
Original file line number Diff line number Diff line change @@ -152,7 +152,8 @@ - (void)oneSignalDidRegisterForRemoteNotifications:(UIApplication*)app deviceTok
152152- (void )oneSignalDidFailRegisterForRemoteNotification : (UIApplication*)app error : (NSError *)err {
153153 [OneSignal onesignal_Log: ONE_S_LL_VERBOSE message: @" oneSignalDidFailRegisterForRemoteNotification:error:" ];
154154
155- [OneSignal handleDidFailRegisterForRemoteNotification: err];
155+ if ([OneSignal app_id ])
156+ [OneSignal handleDidFailRegisterForRemoteNotification: err];
156157
157158 if ([self respondsToSelector: @selector (oneSignalDidFailRegisterForRemoteNotification:error: )])
158159 [self oneSignalDidFailRegisterForRemoteNotification: app error: err];
Original file line number Diff line number Diff line change @@ -107,7 +107,8 @@ - (void)onesignalUserNotificationCenter:(UNUserNotificationCenter *)center
107107 default : break ;
108108 }
109109
110- [OneSignal notificationOpened: notification.request.content.userInfo isActive: YES ];
110+ if ([OneSignal app_id ])
111+ [OneSignal notificationOpened: notification.request.content.userInfo isActive: YES ];
111112
112113 // Call orginal selector if one was set.
113114 if ([self respondsToSelector: @selector (onesignalUserNotificationCenter:willPresentNotification:withCompletionHandler: )])
You can’t perform that action at this time.
0 commit comments