Follow

How do I configure push for Firebase?

Step 1:
  • 'Create new project'
 
  • Name your project, and select your region
 
Step 2:
  • Create your iOS app
  • Add your bundle ID (nickname and app store ID are optional)
  • Select 'Add app'. Your 'GoogleService-Info.plist' will download automatically. You need to keep this.
 
  • Click next until finished, leave all options as default.
Step 3:
  • 'Add another app' and create your Android app
 
  • Add your package ID (nickname is optional). SHA1 will be added later. 

  • Select 'Add app'. Your 'google-services.json' will download automatically. You need to keep this.

  • Click next until finished, leave all options as default.
 
Step 4:
  • In the app-target you need to add the push provider into the Config.plist
 
 
  • Add GoogleService-Info.plist downloaded earlier into the iOS > Assets folder.
  • Add google-services.json downloaded earlier into the Android folder.

Step 5:

  • In the Firebase console, on the iOS app select Settings.
  • Under Cloud messaging, upload the Development and Production push.p12 certificates. This is iOS configured.
  • You should also make a note of the 'Legacy Server key' as this will be needed later.
Step 6:
  • You will need to build an APK in terminal. Make note of SHA1 and SHA256.

  • In Firebase console, in the Android app select Settings.
  • Add the SHA1 and SHA256.

Step 7:
  • In the distribution service you need to add the Firebase addon as below, and add the Legacy server key from step 5 as the auth_key:
$seed_accounts[$account_code]['pubs'][$pub_code]['addons'][] = array(
        'addon_type' => 'firebase',
        'config' => array(
            'auth_key' => 'XXX'
        ),
);
Was this article helpful?
2 out of 2 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk