Use this page with AI

Copy this into your coding assistant and add your request.

Read https://openiap.dev/docs/apis/ios/subscription-status-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]
See an example request →

iOS subscriptionStatusIOS

Get detailed subscription status using StoreKit 2 (iOS 15+, macOS 14+).

Wraps Product.SubscriptionInfo.status — returns an array projected onto SubscriptionStatusIOS, which exposes only renewalInfo and state. The transaction field on Apple's Status type is not surfaced by this wrapper; if you need the underlying transaction, call latestTransactionIOS(sku) separately. iOS 15+, macOS 14+. See the Apple StoreKit reference.

Signature

swift
func subscriptionStatusIOS(sku: String) async throws -> [SubscriptionStatusIOS]

Parameters#

  • sku (required, string) — Subscription product identifier.

Returns#

Promise<SubscriptionStatusIOS[]> — one entry per status the user has on the subscription:

  • state (string) — StoreKit 2 renewal state (e.g. "subscribed", "inGracePeriod", "expired").
  • renewalInfo (RenewalInfoIOS?) — Renewal metadata (auto-renew flag, renewal date, expiration reason). May be null.

Example

swift
let status = try await OpenIapModule.shared.subscriptionStatusIOS(sku: "com.app.monthly")