I added to my project Firebase Cloud Messaging for receiving and sending push notifications. I followed steps in original tutorial from Google. The result was exciting, I can receive push notification on my device - I published it to TestFlight - problem occurred.
I realize that I need to create different certificate. (???) Then I delete my key (.p8) from Firebase Cloud messaging and recreated it (development too) + I recreated same development provisioning profile (old ones I revoke), I repeated process from tutorial but now I can't get push notification even in my device, neither on TestFlight.
Can anyone help me with these questions?
- Which certificate/profile I should create? For now, I have created .p8 key for development and provisioning profile for development (not working anymore)
- Should I change something in my code? I found somewhere that I should change URL from sandbox to prod, Firebase do it automatically? It's problem in device token? I can't recieve even test notification when I copy / paste FCM token to console.
- It's possible to send silent push notification from Firebase Messaging Console? (Can I set all required headers in Firebase console?)
- Difference between .p8 and .p12? It's possible to have .p8 key for production?
Please help me from this. Thanks!
[UPDATE][SOLVED] After completing the steps from this answer and changing the Team ID in Firebase to same Team ID from Apple Developer I was able to receive notification to my device and all the TestFlight devices.