[Solved] Local receipt validators causing large memory allocation

The Validate(string) method on both CrossPlatformValidator and AppleValidator are allocating large chunks of memory under-the-hood.

In the attached profiler screen capture, I’m providing a valid purchase receipt stored locally on the iOS device.

The Profiler Sample labeled IsValidReceipt() → Validate() is the sample of the CrossPlatformValidator.Validate().

The Profiler Sample labeled IsValidRawReceipt() → AppleValidator() is the sample of the AppleValidator.Validate().

Why are such large allocations being made by this function? This seems like an unusually large allocation for local receipt validation.

I’m using IAP 1.8.3 and Unity 5.3.7p2

@mcjones9

Thanks for alerting us to this. We will look into this issue and let you know what we find.

Hey, I was just checking if there are any updates to this particular issue? I’m currently unable to utilize the local receipt validation system until this memory overhead issue is addressed.

@mcjones9

A fix for this issue is planned for the next version of the IAP plugin (1.11.2) which will be available soon, pending QA testing.

With the fix, we were able to see memory improvements of 100x in some cases! So we really appreciate you pointing this out.