Search Unity

Unity IAP (1.20) bad performance on iOS.

Discussion in 'Unity IAP' started by stopiccot_tds, Oct 9, 2018.

  1. stopiccot_tds

    stopiccot_tds

    Joined:
    Oct 1, 2016
    Posts:
    111
    I'm profiling load app start times of our app on iPhone 5S.
    Here is what I get from Xcode instruments run:

    Screenshot 2018-10-09 11.56.36.png

    Honestly I have no idea why it's taking 1.6 seconds.
    Can someone from IAP team help me with investigating why it's taking so long?

    Here is some info:
    Unity IAP version: 1.20
    Unity version: 2017.4.10 LTS
    Device: iPhone 5S running iOS 11.0.3

    What additional info I can provide to nail down the issue?
     
  2. Jasper-Chimp

    Jasper-Chimp

    Joined:
    Sep 4, 2018
    Posts:
    7
    Following this tread, we're seeing the same issue here. Application blocking for about 15 seconds on iOS devices (iPhone 5S, but also other devices) when receiving the initial purchases (on initialization or when recovering purchases if the app receipt cannot be obtained on initialization. The receipt contains about 100 subscription renewals from previous tests, which we suspect has something to do with this.

    Using IAP 1.20, Unity 2017.4.7f1
     
  3. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    If you are not completing a transaction either by returning Complete from ProcessPurchase or calling ConfirmPendingPurchase if you're doing server-side validation, it would likely explain the 100 subscription renewals (which happens very fast in Sandbox/TestFlight, up to 6 times a day). The blocking behavior might be on Apple Sandbox only, can you confirm that this is a test or with a Released app?
     
  4. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
  5. stopiccot_tds

    stopiccot_tds

    Joined:
    Oct 1, 2016
    Posts:
    111
    Thanks, 1.20.1 seems to be helping
     
  6. Jasper-Chimp

    Jasper-Chimp

    Joined:
    Sep 4, 2018
    Posts:
    7
    Same here, performance with 1.20.1 seems to have improved.