In some posts from July people were saying that “hasReceipt” is false for a purchased non-consumable after restarting the app, on iOS. “hasReceipt” should be true.
(Works fine on Android.)
It was also mentioned that Unity is looking into fixing this in a future update.
Has it been fixed yet?
If not, any idea when will it be fixed?
It doesn’t seem to be fixed in version 1.8.1 of IAP.
But we are using Unity 5.3.4, so it might have been fixed but only works when using a newer version of Unity.
Otherwise, well done to the Unity team with adding IAP to Unity
That is expected behavior for iOS. hasReceipt is a transient field that will only be true for the session that the purchase was made. The version of the Editor won’t affect this, so no need to worry about that.
It is up to the application to manage what the user is entitled to. For iOS, this would require you to parse the receipt for owned products. You can read more about that in this forum post:
The CrossPlatformValidator.Validate method returns an array of products.
We loop through the array to find the specific product we are looking for.
Something I wondered about, but did not have time to test (yet):
Which product ID is in the array (i.e. is it the Unity product ID, or the store specific product ID)?
Currently our Unity and store product IDs are the same, so the process works for us.
I’m glad you were able to use the app receipt to get what you needed.
This should be the Unity product ID. As mentioned in the Manual page for Defining Products, store-specific identifiers are only used when communicating with the stores.