Testing iOS Notification with APNs

#iOS

whck6

# for production
python push_debug.py aps.pem ${device_token}

# for sandbox
python push_debug.py aps.pem ${device_token} -s

產出 PEM 檔

openssl pkcs12 -in aps.p12 -out aps.pem -nodes -clcerts

從 keychain 導出 p12 檔後需要轉成 pem.

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html https://medium.com/@ankushaggarwal/generate-apns-certificate-for-ios-push-notifications-85e4a917d522 https://github.com/pubnub/pubnub-support/blob/master/kb/code/push_debug.py