Why I'm not receive notification not received in background???
It's my first experience when I work with Push Notifications. I read the documentation and follow for guide from Google Firebase Doc. Also I implement code from firebase/quickstart-ios. After that I created console on firebase service, upload my certificate and successfully send message which I receive as in Foreground so in Backround too.
But when I change console which I taken from backend developer, my app stopped take push notification in Background mode.
What I'm doing:
- In capabilities Push Notification set to "ON"
- In capabilities Background Mode enable "Background fetch", "Remote notification"
- content_available set to "1"
- Sending message Priority set to "High"
I can't understand why app stopped receive notification in Background if it working well before.
I also read the same question on stackoverflow, but didn't find the solution of my problem.
Please, help to sort out this problem!
UPDATE:
Actually I didn't receive any notification as in Background so in Foreground. The reason was that I accepted receive notification when I install my app with GoogleService-Info.list from first console. So, if you change the console, of course you change the GoogleService-Info.list, and you should again to accept receive notification!!! If you don't to accept, didReceiveRemoteNotification will not call!
content_availableshouldn't be set to1, it should be set totruewhen using FCM. Can you try it out? If it still doesn't work. Can you post a string structure of your payload? - AL.notificationanddatapayload, depending on how you want FCM to handle the notifications - Brien Crean