Copy this into your coding assistant and add your request.
Read https://openiap.dev/docs/apis/has-active-subscriptions 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]
Quick check if the user has any active subscriptions.
iOS: Convenience over getActiveSubscriptions — returns true if at least one matching subscription has the active flag set (expiration in the future); a subscriber in billing grace reads inactive. Apple docs. Android: Convenience over queryPurchasesAsync(SUBS) — returns true if any subscription is in PURCHASED state. Google docs.
React Native, Expo, and native promise APIs reject on failure. React Native and Expo hooks call onError before rethrowing. Handle that rejection separately from a valid false result.
Promise<boolean> — true when at least one (matching) subscription is in an active state. Convenience over getActiveSubscriptions when you only need a yes/no answer. When upgrading from an older major, see the subscription-check upgrade notes.
Only a successful empty query resolves false. Godot entitlement code must use has_active_subscriptions_result(); Godot's compatibility boolean helper still maps failure to false and is not safe for granting or revoking access.
Example
swift
let isPremium = try await OpenIapModule.shared.hasActiveSubscriptions(nil)