Reputation: 3832
I am using OneSignal to send push notifications to my iOS app. My problem is, that when the app is in the foreground, every notification received shows up as an alert. This can be very frustrating for the user, especially given that it is a messaging app.
How could I prevent this?
I am targeting both iOS 9 and iOS 10.
Thank you!
Upvotes: 1
Views: 966
Reputation: 124
Please check the value you added for inFocusDisplaying or inFocusDisplayType.
By default this will show an alert in your app along with the notification. Setting: InAppAlert
To not see the notification when the app is open set it to None
If you do want to see the notification when the app is open and not an alert, set it to Notification
More for native iOS SDK here: https://documentation.onesignal.com/docs/ios-native-sdk#section--infocusdisplaytype-
Upvotes: 1