-
Notifications
You must be signed in to change notification settings - Fork 274
Firebase Push Notification Setup
Ben Smiley edited this page Feb 5, 2018
·
2 revisions
To setup Firebase Cloud Messaging you first need to follow:
- Setup an APN key.
- Inside your project in the Firebase console, select the gear icon, select Project Settings, and then select the Cloud Messaging tab.
- In APNs authentication key under iOS app configuration, click the Upload button.
- Browse to the location where you saved your key, select it, and click Open. Add the Key ID (available in Certificates, Identifiers & Profiles in the Apple Developer Member Center) and click upload.
- Enable the push notifications capability in your Xcode project Project -> Capabilities -> Push Notifications
- Add the Server key from the Firebase console Settings -> Cloud Messaging -> Project credentials to the
cloud_messaging_server_key
entry in Info.plist -> chat_sdk -> firebase
Note: We add the server key directly to the project because it makes it very easy to send targeted push notifications. However, this method isn't the best from a security perspective because it means that if someone decompiled and examined the app package, they could gain access to the key and send push notifications using your account. A more secure approach would be to use a separate app server to send the pushes or to use Google Cloud Code.