I'm using OneSignal to send device to device notifications for iOS.I'm able to send a notification to a particular device , but the if the user is inside the app it shows the notification as an alert .I want to show it as a banner . I found some documentation on "One signal regarding OSNotificationDisplayType" but I'm not able to figure out how to use it .
OneSignal.postNotification(["contents": ["en": "Test Message"], "include_player_ids": [oneSignalId]])
Notification will not display whenever your app is open. Notification banner will only show when your app is in background or closed.
You need to create some custom banner in order to display notification to user when your app is opened.