Firebase Cloud Messaging Configuration
- Setup you fire base ios App / download and add the GoogleService-Info.plist
- install pods
- Fire base Console : setup cloud messaging [ upload .p8 file , team ID , key] that you will get from the Apple App connect when registering for APNs.
if you don’t know how to do that just read the article and then come back
- Create an app on the app-store-connect make sure to connect it to the same Bundle Identifier
- Project > TARGETS > Signing & Capabilities > add [backGround Mode (background fetch , remote notifications ) ]
- Project > TARGETS > Info, the link that you will add hear you find it in the GoogleService-Info.plist under the name
- create a NotificationController.swift file, (where I got this file from Firebase repo no github, with some modification so it will be easier to setup with the rest of the steps), and past the following cod in it.
- setup AppDelegate as following:
and voala you every thing is set you can test your notifications from the firebase console