Search Unity

Codeless in App Purchases in iOS not executing pop up in Testflight

Discussion in 'Unity IAP' started by Rwaldrop86, Jul 17, 2019.

  1. Rwaldrop86

    Rwaldrop86

    Joined:
    Jul 20, 2012
    Posts:
    6
    Anyone else having this problem , I created a Sandbox User account , im using Codeless IAP buttons they work fine in Android but in the IOS I cannot get it to show up the popup to login . You touch the Codeless IAP Button and nothing happens absolutely nothing. Yet when i check my logs it does show it does detect my products so the products are loading but no popup to login to Sandbox user no nothing , does not ask you to login and then buy nothing. Anyone else having this problem because im tired of creating Sandbox accounts for them to not work.
     
  2. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    358
    If you're logged in already (Settings > iTunes & App Store) then you won't get the login popup appear - but should still get the purhcase prompt asking for a p/w.

    To login with a sandbox user, log out of iTunes & App Store and leave it logged out. Then when you try to do a purchase you'll get the login prompt before the confirm purchase prompt. I did see people say being logged out would display the login prompt on app launch, however this hasn't happened for me.
     
  3. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,190
  4. Rwaldrop86

    Rwaldrop86

    Joined:
    Jul 20, 2012
    Posts:
    6
    I have logged out of iTunes & App Store and the pop up still does not happen , i cannot seem to get sandbox to work and i have a sandbox user i have made 3 of them and none of them worked . at first i thought the products did not load but they did .

    "
    [629] <Notice>: UnityIAP UnityEarlyTransactionObserver: Created
    [629] <Notice>: UnityIAP UnityEarlyTransactionObserver: Registered for lifecycle events
    [629] <Notice>: UnityIAP UnityEarlyTransactionObserver: Added to the payment queue
    [629] <Notice>: UnityIAP Version: 1.22.0
    [629] <Notice>: UnityIAP: Requesting 4 products
    [629] <Notice>: UnityIAP: Requesting product data...
    [629] <Notice>: UnityIAP: Received 4 products
    [629] <Notice>: UnityIAP: No App Receipt found
    [629] <Notice>: UnityIAP: No App Receipt found
    [629] <Notice>: UnityIAP: Promo interface is available for 4 items
    [629] <Notice>: UnityIAP: Add transaction observer
    [629] <Notice>: UnityIAP UnityEarlyTransactionObserver: Request to initiate queued payments"

    )[91] <Notice>: iTunesAccountsNotificationPlugin: [I REMOVED THIS FOR PRIVACY] Determining whether or not we can save <SSAccount: >: Local Account | storefront = I REMOVED THIS FOR PRIVACY>. client = itunesstored
    [91] <Notice>: "Updating existing account: (null)"
    [91] <Notice>: "The plugin for account <private> does not implement credentialForAccount"
    [91] <Notice>: "No plugin provides credentials for account <private>. Falling back to legacy behavior."
    [91] <Notice>: Nil qualifiedUsername for account <private>. Can't look up credential
    )[91] <Error>: "Error returned from daemon: Error Domain=com.apple.accounts Code=11"
     
  5. Rwaldrop86

    Rwaldrop86

    Joined:
    Jul 20, 2012
    Posts:
    6
    When i click the buttons nothing executes even though it works perfect on Android , it does not work on iOS i have a feeling it is a sandbox issue but i cannot figure out how to get the sandbox to work because ive made 3 different sandbox accounts and it never works i click on the button no dialog box shows up nothing happens.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,190
    As mentioned, please add Debug.Log code to your code where you award the user the products. There is no purchase attempt shown in your logs, either success or fail. Note in the Sample project how I am writing the Debug.Log statements to the UI, very handy for debugging. Are you using TestFlight? https://docs.unity3d.com/Manual/UnityIAPAppleConfiguration.html
     
  7. Rwaldrop86

    Rwaldrop86

    Joined:
    Jul 20, 2012
    Posts:
    6
    I have Debug Log in the code it does not show up it is not executing anything even in Testflight
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,190
    Please show the code you are using for a successful purchase and a screenshot of your IAP Purchase button Inspector properties
     
  9. Rwaldrop86

    Rwaldrop86

    Joined:
    Jul 20, 2012
    Posts:
    6
    the functions work in Android
     

    Attached Files:

  10. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,190
    And the code please
     
  11. Rwaldrop86

    Rwaldrop86

    Joined:
    Jul 20, 2012
    Posts:
    6
    Code and part of the log, this was after running a development build, the only reason it says 8 products is because i had to re add my products in apple because i deleted them because i had submitted them and they went red so it said developer action required so i deleted them to re add them but it didnt work so i had to create 4 new ones. so it shows 8 but only 4 load because the 4 originals i deleted.
     

    Attached Files:

  12. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,190
    Please test and publish with the Sample IAP project. I don't see where you are calling buy_debug, we could continue to go back and forth. One note, make sure you've filled out the business and tax information on iTunes Connect, you need this even if you're just testing.
     
  13. Haazo

    Haazo

    Joined:
    Sep 7, 2017
    Posts:
    2
    I have been having this same issue with Unity 2019.1.12f1 and IAP 1.22. On Android the correct prices are pulled and the iAP works fine. On iOS the prices don't load in and the app store dialog to purchase does not open. I am using codeless, I have already triple checked that my product IDs, SKU, Team ID are all correct. Tax & paid apps agreement is completed (my app is live on the app store). I am currently trying to test a build with IAP 1.20 instead to see if anything changes.
     
  14. kartoonist435

    kartoonist435

    Joined:
    Feb 14, 2015
    Posts:
    24
    I’m having this issue as well in 2017.3 using IAP 1.22. Anyone find a resolution?
     
    Joshua1990 likes this.
  15. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,190
    Please provide the results of your debugging and the device logs.
     
  16. Haazo

    Haazo

    Joined:
    Sep 7, 2017
    Posts:
    2
    I managed to fix my issue, here's what I did.

    I am using cloud build for my iOS builds and symbolicating logs was too annoying of a process so I used this in-game logs viewer: https://assetstore.unity.com/packages/tools/log-viewer-12047 to see the unity console in-game when running my game through test flight.

    In the console I was getting warning along the lines of "The referenced script on this Behaviour is missing" for my IAPButtons. I found this forum post: https://forum.unity.com/threads/iap-button-goes-missing.503362/ and used @thibouf solution of removing the #if UNITY_PURCHASING from the IAPButton.cs script.

    Now my iOS in-app purchases work flawlessly using IAP 1.22, Unity 2019.1.12 and Cloud Build.

    TL;DR: Removed #if UNITY_PURCHASING from IAPButton.cs script. (and the #endif at the bottom).
     
  17. kartoonist435

    kartoonist435

    Joined:
    Feb 14, 2015
    Posts:
    24
    When I do this I get a ton of errors that the different purchasing listeners are not found. And my build fails. Did you add a using purchasing somewhere else? Also sorry for no log file yet. I don’t have a log because it’s such a huge pain to grab the other certs rebuild it get it to a Mac and run it from Xcode.
     
  18. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,190
    Compare your project to the Sample IAP project here. Use Unity 2018 for now, we are working to improve IAP support in Unity 2019.* The first project (my preference) is scripted, the second is Codeless https://forum.unity.com/threads/sample-iap-project.529555/
     
  19. kartoonist435

    kartoonist435

    Joined:
    Feb 14, 2015
    Posts:
    24
  20. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,190
    kartoonist435 likes this.
  21. kartoonist435

    kartoonist435

    Joined:
    Feb 14, 2015
    Posts:
    24
    This didn't change anything adding that Custom Define. I'll have to test a local version. This is driving me nuts. I am doing a lot of web requests and the code updates in 2018 and I didn't want to mess with all that so now I get the 2017.3 bugs lol