0

I'm adding Google Play Services to my Unity game, and I was following the tutorial

You should create two client IDs, one with the release certificate fingerprint and another with the debug certificate fingerprint. Make sure to use the same package name for both. This allows Google Play games services to recognize calls from your linked APKs that are signed with either certificate. For more information about certificate signing for Android, see Signing Your Application.

I was adding these services for the Google leaderboards. My question is, what does having two separate Client IDs for debugging and release do? Will there be two separate leaderboards, one for debugging and one for users? I was just wondering because it seemed a bit superfluous when I first read it.

Andy
  • 357
  • 2
  • 17

1 Answers1

1

This is to make sure that you can use Google Play Games services both for testing and for the official release. When you publish an app in the play store, you'll undergo a signing of certificate.

Sign your APK with the correct certificate

When linking your Android app to your game in the Google Play Console, you must use exactly the same package name and certificate fingerprint that you used to publish your app. If there is a mismatch, calls to Google Play games services will fail. You should create two client IDs, one with the release certificate fingerprint and another with the debug certificate fingerprint, and use the same package name for both.

You won't be able to use the debug certificate for the official release as stated in Sign your debug build hence the need for debug keys:

Because the debug certificate is created by the build tools and is insecure by design, most app stores (including the Google Play Store) will not accept an APK signed with a debug certificate for publishing.

ReyAnthonyRenacia
  • 17,219
  • 5
  • 37
  • 56
  • Would it be bad practice to just use my publishing key for debugging? I can do this since I'm using a game engine (Unity). – Andy May 18 '17 at 16:37