Maps Works in RELEASE, DEBUG but not when in Production

Hi devs,

this is not my first App deployed to the Store using Xamarin.Forms, so i have experience.
I've signed and done everything regarding my Key and Maps API like I always do, but this is the First time that MAPS won't work in Production.

I signed my App using Visual Studio and deployed it, I used the SHA1 private Key and got my MAPS API Key.
I checked everything (Package name, SHA1).

Release Builds on test devices works as expected.
Debug Builds on test devices works as expected.
Production Release in Play Store doesn't Work.

Don't know what I'm missing here.

Answers

  • Mahmoud_KamelMahmoud_Kamel USMember ✭✭

    ==> in debugging you are using public sha1 of your Computer and name of package in Google API credentials
    and you will get this sha1 on Mac by :
    1- open terminal.
    2- Type this: keytool -list -v -keystore ~/.local/share/Xamarin/Mono\ for\ Android/debug.keystore -alias androiddebugkey -storepass android -keypass android
    3- use this sha1 in Google credentials.
    ==> so in release you need sha1 of Android Signing Identity not of your computer and this you can get On Mac by:
    1- open Terminal.
    2- keytool -list -v -keystore /Users/[User name]/Library/Developer/Xamarin/Keystore/[identity Name]/[Identity Name].keystore -alias [identity Name].
    3- use this sha1 in Google credentials.

  • stesvisstesvis USMember ✭✭✭

    @ValonKast did you find a solution?
    I have the same problem now.

    • I made a Google Map Api Key for android and restricted it
    • I added my package name and my debug.keystore SHA1 => Map working in debug
    • I added my package name and my production keystore SHA1 => map is blank

    I don't know what the problem is...any help here? Thanks and hopefully you solved it by now!

  • DimitrisMylonasDimitrisMylonas USMember ✭✭

    It's an old post by maybe someone might find it useful.
    None of them will work (debug.keystore SHA1, production.keystore SHA1)
    When you deploy your app in Google Play, then Google Play will sign your app with their own SHA1 (which is not the same from the 2 previous ones)
    You can find this SHA1 in Google Play Console > Release Management > App Signing under App signing certificate.
    Take this SHA1 and enable your API key for this SHA1. You might need to wait 5 minutes before it's activated (and probably restart the app on your device)
    This is what worked for me.

Sign In or Register to comment.