I have been trying to migrate to the new APNs Provider API.
I have successfully generated a new CSR, registered a new App ID, obtained a provider certificate from Apple, installed the certificate and private key on my provider server, and tested using my certificate to make a connection to APNs using this command:
openssl s_client -connect "${APNS_HOST_NAME}":443 -cert "${CERTIFICATE_FILE_NAME}" -certform DER -key "${CERTIFICATE_KEY_FILE_NAME}" -keyformat PEM
Then I Used The Following Command To Send A Push Notification:
% curl -v --header "apns-topic: ${TOPIC}" --header "apns-push-type: alert" --cert "${CERTIFICATE_FILE_NAME}" --cert-type DER --key "${CERTIFICATE_KEY_FILE_NAME}" --key-type PEM --data '{"aps":{"alert":"test"}}' --http2 https://${APNS_HOST_NAME}/3/device/${DEVICE_TOKEN}
The HTTP status: 200 (request succeeded), and delivery of a notification with the text “test”on my destination device.
Now I would like to use an existing API that uses APNs to send messages on iOS. I am ready to add the request header fields that seem to be required now.
Are provisioning profiles still required for APNs development for iOS? I did not see it mentioned in Apple's Documentation.
Setting Up a Remote Notification Server
Generating a Remote Notification