At the beginning, thank you all for great support I had experience from this forum.
Recently I had an issue with push notifications not working on IPhone and I was searching here and on external services for the solution. Finally I had a working solution and want to share with you the steps how I achieved that. Hope it will be useful for others. The example enables the push notification on existing app I developed.
First key aspect for push notification
While you are going to test: push notification is only working on the standalone application - it means that you will not see any notification using appgyver preview app.
Ok let’s start:
- In Appgyver add as on the picture - in my case I added that as a button action. To see the device token I use Alert, however I recommend to use different outputs to easy copy&paste the device token for test purposes.
- Now as stated in official Appgyver guideline Push notifications - Google Firebase go tu Sign In - Apple → Certificates:
a. Enable push notification on your App ID.
Mark the checkbox “Push Notification” and add the required certificate by clicking “Edit”
Once you finish, the certificate will be visible in the mian view
Download your push notification certificate file. This certificate will be later used in Firebase Cloud messaging as APNs Certificates and can be converted to *.pem once you would like to use curl.
Important: check identifier name, it needs to be equal/explicit to the Bundle ID on Firebase Project settings->General and in Project settings->Project settings->Cloud Messaging. The identifier will be later used in appgyver build service configuration.
b. Now you need to create your new Distribution Certificates
Download your distribution certificate file.
c. Then create new Provisioning Profiles
Download your distribution provisioning file.
d. In the last step we need to generate “Key” *.p8 file, if I understood correctly for Firebase <-> Push Service communication. Later we will add this key to Firebase as APNs Authentication Key.
Now short check. You should see in your profile view the “Push Notification” enabled.
Again please check Bundle ID title.
Now we open Appgyver Build service and configure the build with a recently generated distribution certificate and provisioning file. Remember to add the same Bundle identifier.
Last step before we can start testing - move to the Firebase Project settings->Cloud Messaging and add key file (*.p8) and push notification certificate.
Once the app is delivered and you install it on your mobile you can start the test.
Hope it’s useful. If I missed something or was not clear - please let me know.