Firebase App Invite not working in release build APK

1.9k views Asked by At

I am working with Firebase app invite for the first time, its working fine with debug build APK, but its not working in release build APK. Do I need to add something in pro-guard?

compile 'com.google.firebase:firebase-invites:10.0.1'
2

There are 2 answers

0
Mikayel Sahakyan On

You have to update SHA1 fingerprint from firebase console. Instead of using SHA1 of debug.keystore you should use SHA1 fingerprint of your release keystore.

Command line:

  1. keytool -exportcert -alias YOUR-KEY-ALIAS -keystore PATH-TO-YOUR-RELEASE-KEYSTORE/keystore.jks -list -v

  2. Copy and paste new SHA1 fingerprint to firebase console.

  3. Download a new google-services.json and update it in your project.

0
runrmrf On

For those of you who enabled Google Play App Signing, you'll also have to add the SHA-1 key from the "App Signing Certificate" to your Firebase console and use the updated google-services.json in order for the invite to work on apps launched to the Google Play Store.

Steps to locate the SHA-1 key: 1) Go to your Google Play Console 2) Select the targeting app 3) Go to "App signing" under "Release management" 4) The SHA-1 key can be found under "App Signing Certificate"

It took me many hours to resolve the issue and I hope this can help someone who runs into the same issue.