Use this page with AI
Copy this into your coding assistant and add your request.
Read https://openiap.dev/docs/apis/ios/get-promoted-product-ios and https://openiap.dev/llms.txt. Follow the reading instructions, detailed reference, and linked guides relevant to my task before making changes.
Inspect my existing project and reuse its framework and conventions. Ask me for missing product decisions. Implement the requested behavior and run the applicable checks.
Show the working result, the commands and actual test results, and any remaining limitations. Keep your explanation brief.
My request: [describe what customers should be able to do]iOS getPromotedProductIOS
Get the currently promoted product from App Store (iOS 15+).
Reads the product surfaced via App Store promoted IAP campaigns. OpenIAP listens to PurchaseIntent.intents on iOS 16.4+ and uses SKPaymentTransactionObserver.shouldAddStorePayment only on iOS 15–16.3. When a purchase intent contains an externally redeemed win-back offer, OpenIAP preserves that exact offer for the next matching requestPurchase call unless the caller supplies an explicit win-back or promotional offer. See the Apple StoreKit reference.
Signature
swift
func getPromotedProductIOS() async throws -> ProductIOS?Returns#
Promise<ProductIOS | null> — the App Store-promoted product, or null if no campaign is currently queued.
Example
swift
let product = try await OpenIapModule.shared.getPromotedProductIOS()