Problem with IAP on iOS - InvalidSignatureException (invalid IAP Security signature)

Hello.
IAP stopped working on my iOS app since one of the updates to the store. The updates I was doing had nothing related to IAP but to the functionality of the application only. In the logs the cause stands as:

Invalid receipt, not unlocking content = Exception of type ‘UnityEngine.Purchasing.Security.InvalidSignatureException’ was thrown."

Everything was working fine till version of my app 0.21 and from 0.22 whatever I am doing, I am not able to make IAP working in my app. First I assumed this was due to my not approving the Apple Developer Program License Agreement but after that was authorized problem is still there.

From user experience, everything seems to work fine cause purchase or restored process is completed and it is just that I am not able to find the product due to this exception.
On the other hand, I tested it on Sandbox and it works without problems.

I am using IAP 4.6.0. To be precise I once released IAP 4.9.3 but then rolled back to 4.6.0.

I have attached full log from console.

Any feedback how to address this problem will be appreciated.

Regards,
Greg

Okey. So the problem was with Unity IAP Package I was using. I had to update to 4.9.4 cause it has some recent changes: Using the CrossPlatformValidation (or AppleValidator), receipts will now be validated if their certificate chain is encoded in SHA-256 instead of SHA-1. Old receipts encoded in SHA-1 will still be validated

3 Likes