Alternative to SetPublicKey

I need to handle multiple google public keys from one codebase but after upgrading Unity from 2018 to 2020 I’ve message that:

Assets\Code\Managers\InAppPurchase\Unity\GooglePlayUnityInAppPurchaseManager.cs(20,13): warning CS0618: 'IGooglePlayConfiguration.SetPublicKey(string)' is obsolete: 'SetPublicKey is deprecated, nothing will be returns and no code will be executed. Will be removed soon.'

Of course there is no info what I should use instead and why is this removed. Is there any alternative to this? Option to change key during build time would be enough.

I’m not familiar with that API call, you might need to check with Google support. Perhaps other users here may be familiar.

It’s actually a thing of Unity IAP, that was removed in the 2.2.0 version:
Unity IAP package 4.12.2 is now available page-2#post-6506532

There is no alternative to it because it is not needed anymore. The public key is not necessary to the billing API, since it is detected and integrated by the app signing process in Google Play.

1 Like