rejected for iap, ios and unity

0
96

[ad_1]

I am facing this problem with iap, in the editor everything works great but on testflight not at all.
p.s. everything in the editor and on apple developer is set corectly.
here are the codes:

Next Steps

When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code "Sandbox receipt used in production," you should validate against the test environment instead.

Resources

  • Learn how to set up and test in-app purchase products in the sandbox environment.

  • For more information on receipt validation, see the In-App Purchase FAQ.

  • If your app makes a SKReceiptRefreshRequest call and fails, do not retry the call. Assume the user does not have access. Continue by making the addPayment call.

  • If your app makes a SKReceiptRefreshRequest call to restore previously purchased in-app purchases, make sure the app calls restoreCompletedTransactions when the user selects the "Restore" button.

Please see attached screenshot for details. Request a phone call from App Review

At your request, we can arrange for an Apple Representative to call you within the next three to five business days to discuss your App Review issue.


 
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Shop : DialogBase
{
    [SerializeField] private DiamondPack[] DiamondPacks;
    [SerializeField] private CoinPack[]    CoinPacks;
    [SerializeField] private RemoveAdsPack remove_ads_pack;
    public override void Init ()
    {
        base.Init ();
     
        InitShopDiamond ();
        InitCoinPack ();
        InitRemoveAds ();
    }
    private void InitRemoveAds ()
    {
        remove_ads_pack.Init ();
        remove_ads_pack.RefreshPrice ();
    }
 
    private void InitShopDiamond ()
    {
        for (int i = 0; i < DiamondPacks.Length; i++)
        {
            DiamondPacks[i].Init ();
            DiamondPacks[i].RefreshPrice ();
        }
    }
    private void InitCoinPack ()
    {
        for (int i = 0; i < CoinPacks.Length; i++)
        {
            CoinPacks[i].Init ();
            CoinPacks[i].RefreshEarn ();
        }
    }
    public override void Enable ()
    {
       base.Enable ();
 
        for (int i = 0; i < DiamondPacks.Length; i++)
        {
            DiamondPacks[i].RefreshPrice ();
        }
        for (int i = 0; i < CoinPacks.Length; i++)
        {
            CoinPacks[i].RefreshEarn ();
        }
     
        remove_ads_pack.RefreshPrice ();
    }
 
    #region Interact
    public void InteractClose ()
    {
        DialogExtension.DisableDialog (DialogEnum.DialogId.Shop);
     
        SoundManagerExtension.PlayAudioSound (AudioEnums.SoundId.Fx_Touch_Button);
    }
 
    #endregion
}
 
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Shop : DialogBase
{
    [SerializeField] private DiamondPack[] DiamondPacks;
    [SerializeField] private CoinPack[]    CoinPacks;
    [SerializeField] private RemoveAdsPack remove_ads_pack;
    public override void Init ()
    {
        base.Init ();
     
        InitShopDiamond ();
        InitCoinPack ();
        InitRemoveAds ();
    }
    private void InitRemoveAds ()
    {
        remove_ads_pack.Init ();
        remove_ads_pack.RefreshPrice ();
    }
 
    private void InitShopDiamond ()
    {
        for (int i = 0; i < DiamondPacks.Length; i++)
        {
            DiamondPacks[i].Init ();
            DiamondPacks[i].RefreshPrice ();
        }
    }
    private void InitCoinPack ()
    {
        for (int i = 0; i < CoinPacks.Length; i++)
        {
            CoinPacks[i].Init ();
            CoinPacks[i].RefreshEarn ();
        }
    }
    public override void Enable ()
    {
       base.Enable ();
 
        for (int i = 0; i < DiamondPacks.Length; i++)
        {
            DiamondPacks[i].RefreshPrice ();
        }
        for (int i = 0; i < CoinPacks.Length; i++)
        {
            CoinPacks[i].RefreshEarn ();
        }
     
        remove_ads_pack.RefreshPrice ();
    }
 
    #region Interact
    public void InteractClose ()
    {
        DialogExtension.DisableDialog (DialogEnum.DialogId.Shop);
     
        SoundManagerExtension.PlayAudioSound (AudioEnums.SoundId.Fx_Touch_Button);
    }
 
    #endregion
}

in the editor works well without errors, but in testflight nope…

[ad_2]