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

IAP not working in testflight

Discussion in 'Unity IAP' started by lz7cjc, May 19, 2021.

  1. lz7cjc

    lz7cjc

    Joined:
    Sep 10, 2019
    Posts:
    534
    Hi
    I have got IAP working in the Editor and on Android. When I upload the app to Testflight it doesn't work. I have set up the products but am wondering if there is another step i need to take in order to test it prior to promoting to live.

    Any help much appreciated
    thanks
     
  2. str3lok

    str3lok

    Joined:
    May 27, 2012
    Posts:
    24
    What exactly does it mean that it doesn't work? What errors are issued? What's in the logs?
    A common problem on iOS is that you need to confirm the paid agreement in the developer dashboard.
     
  3. lz7cjc

    lz7cjc

    Joined:
    Sep 10, 2019
    Posts:
    534
    thanks for looking to help me out. I have attached three screenshots - one from the editor
    buyriroseditor.png , which is how it should look,
    one from android,
    google.jpg where i am getting products but with the wrong labels,
    and one from testflight where nothing appears to be set up correctly.
    apple.PNG

    When I go to the admin screen on Apple, all my entries say "Waiting for Review".
    apple console.png
    Do I need to publish to production before this can happen? I set them up about three weeks ago.

    For Google I have set up the products manually in the console but that doesn't appear to have made any difference
    googleconsole.png
    I am running 2019.4.0f1 and version 2.0.6 since upgrading just caused havoc so have rolled back

    thanks for any pointers - I couldn't find the paid agreement section on Apple so can't confirm if that is set up correctly
     
  4. str3lok

    str3lok

    Joined:
    May 27, 2012
    Posts:
    24
    If you have a device, run your app from Xcode directly on that device. This way you can see all the Unity logs in the Xcode window. Perhaps there are some problems at the stage of initialization of purchases or somewhere else.
    If you can't run your app directly from Xcode, you can connect your device to a computer with Xcode, then run Xcode, then open: Window->Devices and Simulators. There, select your device and click Open Console. And filter in the field by app name. But this is less convenient than debugging directly through running the application from Xcode.

    Also, to fully test your purchases, you will need to create a sandbox account: https://help.apple.com/app-store-connect/#/dev8b997bee1

    https://help.apple.com/app-store-connect/#/devb6df5ee51
     
  5. lz7cjc

    lz7cjc

    Joined:
    Sep 10, 2019
    Posts:
    534
    thanks - I will create a sandbox account - perhaps that is the issue. I can't connect my device as struggling to get USB recognised on my setup
     
  6. lz7cjc

    lz7cjc

    Joined:
    Sep 10, 2019
    Posts:
    534
    I am a one man band with a single iphone, so setting up/juggling multiple accounts for this whole sandbox thing is very confusing! Apart from anything else there is no address to go with the test accounts and using my own, unsurprisingly doesn't work. I appreciate this isn't a Mac support forum and have raised a ticket with them.

    However could you confirm whether I should be able to see the correct layout in TestFlight, without having set up anything in sandbox? I have all set up all the agreements etc for the developer account.
    thanks
     
  7. str3lok

    str3lok

    Joined:
    May 27, 2012
    Posts:
    24
    You need to solve the problem of connecting the device, because without debugging, such problems are not solved.

    The sandbox account is not linked to your main account in any way. When creating it inside AppStoreConnect(https://developer.apple.com/apple-pay/sandbox-testing/), you can specify, in my opinion, any email at all. And you do not need to change the main account inside your iPhone (on the contrary, you can not do this! if you did this, then create a new sandbox account). At the moment when you make a purchase, the operating system will ask you to specify an account, and it is at this moment that you need to specify your sandbox account. The only thing I don't know is how much it depends or not on whether developer mode is enabled on your iPhone.

    If you have just confirmed the agreements, then it may take some time for Apple to accept them. The status should become - Active (green).

    In theory, without a sandbox account, you should still see the correct in-game purchases.
     
    lz7cjc likes this.
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Last edited: May 26, 2021
  9. lz7cjc

    lz7cjc

    Joined:
    Sep 10, 2019
    Posts:
    534
    thanks - i have now got device working via usb and tried following the instructions to Install StoreKit but that didn't work - i am in contact with Apple Support but they aren't being much help

    I checked the products on my Apple developer and it now shows there being a problem. Again I have asked Apple for guidance but they ignored the question. Can you see what is wrong?

    btw - since i first posted this I can now use the purchase buttons but I don't get the correct text appearing (I have uploaded the screens from android and ios for comparison
    thanks
     

    Attached Files:

  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    What is the developer action needed in your Dashboard screenshots? Those must be cleared first. Usually you can hover or click on those exclamation points to get more info. IAP won't work until those are cleared.
     
  11. lz7cjc

    lz7cjc

    Joined:
    Sep 10, 2019
    Posts:
    534
    that is my problem! I can't find the issue... outside scope of this post but was hoping the screenshots might reveal something obvious that I have missed.

    Will wait to see if Apple support can shed any light
     
  12. lz7cjc

    lz7cjc

    Joined:
    Sep 10, 2019
    Posts:
    534
    OK this is the problem:
    When App Review rejects an app, the state of the In-App Purchase identifiers follows the state of the app
    i.e there is potentially nothing wrong with the setup - hard to be certain at this stage
     
  13. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    So you tried my suggestion? It wasn't clear from your reply.
     
  14. BeastOfWorld

    BeastOfWorld

    Joined:
    Jul 18, 2019
    Posts:
    10
    Nothing wrong with the set up of the IAP Products, just because the APP was rejected by review
    I think that is it
    I encount the same problem and i am try figure it out why
    thanks you @lz7cjc

    You guys @JeffDUnity3D should really try some thing wrong,Like this : APP was rejected
     
  15. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry I don't follow. Why was it rejected? Apple should tell you why, not Unity.
     
  16. BeastOfWorld

    BeastOfWorld

    Joined:
    Jul 18, 2019
    Posts:
    10
    It is a something wrong elsewhere,
    In my case A: I have a key-word(roblox) rejected
    In my case B: something wrong in IAP sand box test

    Both case A and B lead to that (Developer Actions Needed,)in the pic
     

    Attached Files:

  17. lz7cjc

    lz7cjc

    Joined:
    Sep 10, 2019
    Posts:
    534
    I think i have worked out the problem (at least my one!) and it is crazy
    Until the app gets approved for The App Store, you don't see the correct text on the buttons in your app, in Testflight. So the only way to verify that they are appearing as desired is to push the app to live

    Of course when you do this, it is done blind and may well be the reason the app fails

    So you are basically in a catch 22 until the app is approved which in turn triggers approval of the product catalogues which in turn leads to the buttons and associated text rendering correctly
     
  18. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I have been testing my TestFlight IAP test app for years and it is not live in the App Store.
     
  19. lz7cjc

    lz7cjc

    Joined:
    Sep 10, 2019
    Posts:
    534
    a true example of release often and break things!
    and you see the full interface? strange that I only got to see once my app was approved to go live
     
  20. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry I don't follow. Yes, my app works just fine. That is the purpose of TestFlight, to test before going live.
     
  21. lz7cjc

    lz7cjc

    Joined:
    Sep 10, 2019
    Posts:
    534
    not important - what is important is that you fixed it and i am very grateful!
     
  22. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    My app always worked, I didn't need to fix it. But I'm glad your issue is resolved.