Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Solved] Local receipt validators causing large memory allocation

Discussion in 'Unity IAP' started by mcjones9, May 4, 2017.

Thread Status:
Not open for further replies.
  1. mcjones9

    mcjones9

    Joined:
    May 4, 2017
    Posts:
    6
    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
     

    Attached Files:

  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @mcjones9

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

    mcjones9

    Joined:
    May 4, 2017
    Posts:
    6
    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.
     
  4. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @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.
     
Thread Status:
Not open for further replies.