Firebase Push Notification Setup

Ben Smiley edited this page Feb 5, 2018 · 2 revisions

To setup Firebase Cloud Messaging you first need to follow:

  1. Setup an APN key.
  2. Inside your project in the Firebase console, select the gear icon, select Project Settings, and then select the Cloud Messaging tab.
  3. In APNs authentication key under iOS app configuration, click the Upload button.
  4. 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.
  5. Enable the push notifications capability in your Xcode project Project -> Capabilities -> Push Notifications
  6. 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.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.