Problem beim Erhalten von Produkten aus dem App Store Connect (Ionic)IOS

Programmierung für iOS
Anonymous
 Problem beim Erhalten von Produkten aus dem App Store Connect (Ionic)

Post by Anonymous »

Ich versuche meiner iOS -App eine IAP (im App -Kauf) hinzuzufügen. Ich füge den Kaufprozess lokal zu testen. Die App ist jedoch nicht in der Lage, Produkte aus dem App Connect Store abzurufen. Ich bin mir nicht sicher, was ich falsch mache. Die neue Version wird noch nicht zur Überprüfung eingereicht. Beim Erstellen und Ausführen der App über Xcode ist < /p>
Hier ist die Logik: < /p>
this.store.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] Store initialized successfully.');
this.isInitializing.set(false);
this.loadProductDetails(); // Load details after successful init
})
.catch((err: CdvPurchasePlugin.CdvPurchaseError) => {
console.error('[IAP Initialize] Store initialization failed:', err);
this.isInitializing.set(false);
});

async loadProductDetails(): Promise {
console.log('[IAP LoadProducts] Loading product details...');
try {

// Retrieve the cached product state after initialize/refresh
const product = this.store.get(FOODIE_PLAN_ID_MONTHLY);
if (product) {
this.zone.run(() => {
this.products.set([product]);
});
console.log(
'[IAP LoadProducts] Product details loaded from cache:',
product
);
} else {
console.warn('[IAP LoadProducts] Product details not yet available.');
this.zone.run(() => {
this.products.set([]);
});
}
} catch (error) {
console.error('[IAP LoadProducts] Failed to get product details:', error);
this.zone.run(() => {
this.products.set([]);
});
} finally {
this.zone.run(() => {
this.isLoadingProducts.set(false);
});
}
}
< /code>
Hier ist das Protokoll von meinem realen Telefon: < /p>
⚡️ [log] - [CdvPurchase.Adapters] INFO: AppStore initialized.

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

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

⚡️ [log] - [IAP Initialize] Store initialized successfully.

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

⚡️ [warn] - [IAP LoadProducts] Product details not yet available.
< /code>
Nicht sicher, ob ich richtig verstehe oder nicht. Wenn wir die Produkte im App Store hinzufügen, verbinden Sie sich. Sollte es verfügbar sein, wenn Sie lokal über Xcode testen?

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post