Push notification banner not at all coming even when app is in background in iOS - Swift 3.0. I followed following link to implement push notification for my app.
Asked
Active
Viewed 1,121 times
2
-
Can you share the APNs payload? – n00bProgrammer Apr 04 '17 at 10:57
-
is your app making use of expiration handler ?? – Sandeep Bhandari Apr 04 '17 at 10:59
-
Make sure you have enabled Push Notification for the app. Also double check If you are using proper push notification certificate or not. – MilanPanchal Apr 04 '17 at 11:01
-
@ milanpanchal , The push notification is enabled already, and have proper push notification certificate also. – ABHILASH P Apr 04 '17 at 11:10
-
@Sandeep Bhandari . Not using any expiration handler. – ABHILASH P Apr 04 '17 at 11:25
-
payload = { "merchant_id" = 266; "merchant_image" = "http://xxxxxx"; "merchant_name" = "hello"; message = "abcd"; – ABHILASH P Apr 04 '17 at 11:34
3 Answers
0
I found them unreliable as well when I had the device connected to Xcode. Try removing and installing the app again, and then disconnect it from Xcode. It should start showing up after that when it enters background but, it's definitely not that reliable.
Hope that helps.
Kind regards, Mukund

Mukund Agarwal
- 575
- 5
- 14
-
I tried removing and installing the app again, and then disconnect it from Xcode. But the issue still exists. Only sound and badge are coming. No banner is coming. – ABHILASH P Apr 04 '17 at 11:14
-
-
Does it have banner enabled in the app's settings page?https://support.apple.com/library/content/dam/edam/applecare/images/en_US/iOS/ios10-iphone6-settings-notifications-messages.jpg – Mukund Agarwal Apr 04 '17 at 14:02
-
Finally solved it. The "alert" keyword value in the userInfo was coming as a Dictionary from server. When "alert" keyword is changed to string,(at server side) Banner started appearing. Thanks for all comments. – ABHILASH P Apr 04 '17 at 14:45
0
Finally solved it. The "alert" keyword value in the userInfo was coming as a Dictionary from server. When "alert" keyword is changed to string,(at server side) Banner started appearing. Thanks for all comments.

ABHILASH P
- 105
- 1
- 10
-
-
@ScottyBlades I wish I could. But I am not having access to that code now, as I have joined another company. – ABHILASH P Mar 22 '19 at 07:16