Both Push Notifications
and Remote Notifications
need to be turned on in Xcode.
The payload’s aps
dictionary must include the content-available
key with a value of 1
.
{
"aps": {
"content-available": 1,
...
},
...
}
The app has to acquire as least one of these four permissions: alert
, sound
, badge
, background app refresh
.
This can be check in app by: UIApplication.shared.isRegisteredForRemoteNotifications
(iOS 8.0 and later).