Discussions

Ask a Question
Back to All

Code: 1001, AdaptyCode: NoProductsFound, Message: No In-App Purchases were found

"GetPaywalls Error: Domain: com.adapty.AdaptySDK, Code: 1001, AdaptyCode: NoProductsFound, Message: No In-App Purchases were found."

I'm using Unity 2021.3.3f1

I switched from RevenueCat before the transition everything worked.

Adapt.GetPaywalls returns response null.

Tested on a real device.

My Code:

public class PurchaseService : AdaptyEventListener, IPurchaseService
{
    public event Action Initialized;

    public Adapty.Product[] Products;
    
    public void Initialize()
    {
        Adapty.SetEventListener(this);
        
        Initialized?.Invoke();
    }

    public void GetProducts()
    {
        Adapty.GetPaywalls((response, error) =>
        {
            if (error != null)
            {
                Debug.LogWarning($"GetPaywalls Error: {error}");
                return;
            }
            
            Adapty.Paywall paywall = response.Paywalls[0];

            Products = paywall.Products;
        });
    }

    public void MakePurchase(string productId)
    {
        Adapty.MakePurchase(productId, null, null, null, (_, error) => 
        {
            if (error != null) 
            {
                Debug.LogWarning($"MakePurchase Error: {error}");
                //return;
            }
        });
    }
    
    public void OnReceiveUpdatedPurchaserInfo(Adapty.PurchaserInfo purchaserInfo) { }

    public void OnReceivePromo(Adapty.Promo promo) { }

    public void OnDeferredPurchasesProduct(Adapty.Product product) { }

    public void OnReceivePaywallsForConfig(Adapty.Paywall[] paywalls) { }
}