简体   繁体   中英

Authorization: Key for Push Notifications in iOS

Where can i find the API for Authorization: key for Push Notifications in iOS?

This is Android Authorization key., like this where can i find iOS Authorization key?

'Authorization: key=' . ANDROID_API_ACCESS_KEY,
            'Content-Type: application/json'

Remote push notifications to iOS devices do not require an HTTP Authorization header. From the docs :

The APNs provider API lets you send remote notification requests to APNs. APNs then conveys notifications to your app on iOS, tvOS, and macOS devices, and to Apple Watch via iOS.

The provider API is based on the HTTP/2 network protocol. Each interaction starts with a POST request, from your provider, that contains a JSON payload and a device token. APNs forwards the notification payload to your app on the specific user device identified by the request's included device token.

Here's a simple Python script that can help send push notifications. You will need a certificate and key before you can use this script. To get these (and to get a better overview of push notifications on iOS in general), check out:

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html#//apple_ref/doc/uid/TP40008194-CH11-SW1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM