Search Unity

iOS not pulling data

Discussion in 'Unity IAP' started by Carwashh, Jul 15, 2019.

  1. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    345
    Unity 2019.1.8
    IAP 1.22.0 (installed via Package Manager)

    I've got the IAP's added into App Store Connect, and the IAP catalogue. I used the codeless stuff to set it up in the editor. In the editor the buttons update correctly with the title/description info - but not the price (no big deal/ expected).

    In a build from testflight, none of the data is being populated (see screenshot). My bank details are setup on the dev site and the icon is green for paid apps.

    When running the build from XCode, I see 'No App Receipt found'

    What am I missing to get these working ?
     

    Attached Files:

  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,944
  3. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    345
    Step 1 on in the docs has a broken link: Integrating Unity IAP with your game. leads to a 404 page.

    Step 2, I've got the product identifiers (I added them into Unity and on AppConnect at the same time), but I used the codeless IAP stuff, so I don't need to do any of what is displayed in that image?

    Step 3 under 'Add In-App Purchases' are two broken links Unity IAP ConfigurationBuilder and Unity IAP’s Purchasing.IDs lead to 404 pages.

    My IAPs already look like the image in Step 4 under 'Add In-App Purchases'.

    Step 2 under 'Test IAP - For iOS' is another broken link Unity Purchasing Initialization

    In the IAP catalogue, at the bottom Apple Sku/ Apple Team ID I have filled out, the sku is easy.. the Team ID... can you confirm this is 10 characters/numbers?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,944
    Yeah, there are some bad links. Correct on 2. You don't need a team ID. Are you testing via TestFlight? How does your code compare to the sample I mentioned?
     
  5. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    345
    I'm using the Codeless buttons and IAPListener - I followed this https://docs.unity3d.com/Manual/UnityIAPCodelessIAP.html

    The listener is set to don't destroy on load. And links to a script to display UI for a successful / failed purchase.

    I'll try a build without any TeamID set.

    I'm testing on TestFlight, and from XCode, they are currently giving me the same outcome.

    I need to re-check the sample project to what I'm doing, I looked at the codeless sample and don't remember anything being different (I need to re-install the correct version of Unity for the sample) - but will double check tonight.
     
    Last edited: Jul 16, 2019
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,944
    Please share the code that you are currently using for a successful purchase.
     
  7. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    345
    I have not written any IAP code, the code below is linked to the IAP codeless buttons, and IAP codeless listener via the OnPurchaseComplete and OnPurchaseFailed events in the inspector.

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using DG.Tweening;
    4. using TMPro;
    5.  
    6. public class NosPurchase : MonoBehaviour
    7. {
    8.     [SerializeField] CanvasGroup purchaseCompleteCG;
    9.     [SerializeField] TextMeshProUGUI purchasedAmount;
    10.     [SerializeField] CanvasGroup purhcaseFailedCG;
    11.  
    12.     private float tweenDuration = 0.15f;
    13.     private int purchasedNos;
    14.  
    15.     public void GrantNos(int additionalNos)
    16.     {
    17.         int currentNosCount = PlayerPrefs.GetInt("TTNosCount");
    18.         int newNosCount;
    19.  
    20.         newNosCount = currentNosCount + additionalNos;
    21.         PlayerPrefs.SetInt("TTNosCount", newNosCount);
    22.         PlayerPrefs.Save();
    23.  
    24.         purchasedNos = additionalNos;
    25.     }
    26.  
    27.     public void ShowCompleteUI(bool active)
    28.     {
    29.         float weight = active ? 1 : 0;
    30.  
    31.         purchasedAmount.text = purchasedNos.ToString() + " x";
    32.  
    33.         purchaseCompleteCG.DOFade(weight, tweenDuration);
    34.         purchaseCompleteCG.blocksRaycasts = active;
    35.         purchaseCompleteCG.interactable = active;
    36.     }
    37.  
    38.     public void ShowFailedUI(bool active)
    39.     {
    40.         float weight = active ? 1 : 0;
    41.  
    42.         purhcaseFailedCG.DOFade(weight, tweenDuration);
    43.         purhcaseFailedCG.blocksRaycasts = active;
    44.         purhcaseFailedCG.interactable = active;
    45.     }
    46. }
    47.  
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,944
    So GranNos is the method you call on successful purchase? I'm not seeing any Debug.Log statements in the code, how are you debugging? What exactly is the error that you are receiving and the issue that you are having?
     
  9. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    345
    See the screenshot I attached in my first post. The buttons aren't being populated with the correct info (title/ description/ price).

    I've set this up in the IAP Catalogue and on the App Connect site.
     
  10. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,944
    Please compare and publish the sample project. Many people are using IAP successfully. Note how the sample project makes use of Debug.Log.