HomeiOS Developmentios - Situation when getting merchandise from App Retailer Join (Ionic)

ios – Situation when getting merchandise from App Retailer Join (Ionic)


I am attempting add an IAP (In App Buy) to my IOS cellular app. I am add a state of testing the acquisition course of regionally. Nevertheless, the App isn’t capable of retrieve merchandise from App Join Retailer. Unsure what I am doing unsuitable.

The subscription is created an subscription product and add all particulars on it. The brand new model isn’t submitted for Assessment but.

enter image description here

Within the Ionic, I am utilizing cordova-plugin-purchase, to deal with the native occasions. When constructing and operating the app by way of XCode,

Right here is the logic:

  this.retailer.initialize([
        {
            id: FOODIE_PLAN_ID_MONTHLY,
            type: this.store.PAID_SUBSCRIPTION, // Access directly
            platform: this.store.APPLE_APPSTORE // Access directly (use correct key)
        }
    ])
      .then(() => {
        console.log('[IAP Initialize] Retailer initialized efficiently.');
        this.isInitializing.set(false);
        this.loadProductDetails(); // Load particulars after profitable init
      })
      .catch((err: CdvPurchasePlugin.CdvPurchaseError) => {
        console.error('[IAP Initialize] Retailer initialization failed:', err);
        this.isInitializing.set(false);
      });

 async loadProductDetails(): Promise {
    console.log('[IAP LoadProducts] Loading product particulars...');
    strive {
      
// Retrieve the cached product state after initialize/refresh
      const product = this.retailer.get(FOODIE_PLAN_ID_MONTHLY);
      if (product) {
        this.zone.run(() => {
          this.merchandise.set([product]);
        });
        console.log(
          '[IAP LoadProducts] Product particulars loaded from cache:',
          product
        );
      } else {
        console.warn('[IAP LoadProducts] Product particulars not but accessible.');
        this.zone.run(() => {
          this.merchandise.set([]);
        });
      }
    } catch (error) {
      console.error('[IAP LoadProducts] Didn't get product particulars:', error);
      this.zone.run(() => {
        this.merchandise.set([]);
      });
    } lastly {
      this.zone.run(() => {
        this.isLoadingProducts.set(false);
      });
    }
  }

Right here is the log from my actual cellphone:

⚡️  [log] - [CdvPurchase.Adapters] INFO: AppStore initialized. 

⚡️  [log] - [CdvPurchase.Adapters] INFO: AppStore merchandise: []

⚡️  [log] - [CdvPurchase.AdapterListener] DEBUG: setSupportedPlatforms: ios-appstore (0 have their receipts prepared)

⚡️  [log] - [IAP Initialize] Retailer initialized efficiently.

⚡️  [log] - [IAP LoadProducts] Loading product particulars...

⚡️  [warn] - [IAP LoadProducts] Product particulars not but accessible.

Unsure if I perceive accurately or not. After we add the merchandise in App Retailer Join. Ought to it is accessible when testing regionally by way of Xcode?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments