From f6eb44d1d99176fad7c3cca1ffe8dcc39f3e2c93 Mon Sep 17 00:00:00 2001
From: "promptless[bot]" <179508745+promptless[bot]@users.noreply.github.com>
Date: Tue, 30 Sep 2025 21:38:21 +0000
Subject: [PATCH] Documentation updates from Promptless
---
sdk/quickstart-ios.mdx | 75 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
diff --git a/sdk/quickstart-ios.mdx b/sdk/quickstart-ios.mdx
index 5b1ab1a..4560863 100644
--- a/sdk/quickstart-ios.mdx
+++ b/sdk/quickstart-ios.mdx
@@ -384,6 +384,37 @@ Button("Try Premium") {
}
```
+You can also prevent the paywall from showing if the user already has entitlements for products in that paywall:
+
+```swift
+Button("Try Premium") {
+ Helium.shared.presentUpsell(
+ trigger: "post_onboarding",
+ dontShowIfAlreadyEntitled: true
+ )
+}
+```
+
+
+
+
+ The trigger name configured in your Helium dashboard
+
+
+ _(Optional)_ The view controller to present from. If nil, uses the current top view controller
+
+
+ _(Optional)_ Event handlers for paywall lifecycle events
+
+
+ _(Optional)_ Custom traits to pass to the paywall for personalization
+
+
+ _(Optional)_ If `true`, the paywall will not show if the user already has entitlements for any products in the paywall. Use this to avoid showing upgrade prompts to users who already have premium access.
+
+
+
+
### Attach it to a SwiftUI view as a ViewModifier
You can use the `.triggerUpsell` view modifier from any SwiftUI view:
@@ -508,6 +539,50 @@ Only the `onOpen`, `onClose`, `onDismiss`, and \`onPurchaseSucceeded events can
- Use `onClose` when you need to handle logic when the paywall closed, regardless of reason
+## Checking Subscription Status & Entitlements
+
+The Helium SDK provides methods to check user entitlements and subscription status. All entitlement checking methods are `async` and should be called from within an async context.
+
+
+The SDK automatically caches entitlement data and listens for transaction updates to keep information current.
+
+
+### Available Methods
+
+**`hasAnyEntitlement()`**
+Determines if the user has purchased any non-consumable products or subscriptions.
+
+**`hasAnyActiveSubscription(includeNonRenewing: Bool = true)`**
+Checks if the user has any active subscriptions. Set `includeNonRenewing` to `false` to check only auto-renewing subscriptions.
+
+**`hasEntitlementForPaywall(trigger: String, considerAssociatedSubscriptions: Bool = false)`**
+Checks if the user already has entitlements for products shown in a specific paywall trigger. Returns `nil` if paywall configuration hasn't been downloaded yet.
+
+**`hasActiveEntitlementFor(productId: String)`**
+Checks if the user has entitlement to a specific product.
+
+**`hasActiveSubscriptionFor(productId: String)`**
+Checks if the user has an active subscription for a specific product.
+
+**`hasActiveSubscriptionFor(subscriptionGroupID: String)`**
+Checks if the user has an active subscription in a specific subscription group.
+
+**`purchasedProductIds()`**
+Retrieves a list of all product IDs the user currently has access to.
+
+**`activeSubscriptions()`**
+Returns detailed information about all active auto-renewing subscriptions.
+
+**`subscriptionStatusFor(productId: String)`**
+Gets detailed subscription status for a specific product, including state information like subscribed, expired, or in grace period.
+
+**`subscriptionStatusFor(subscriptionGroupID: String)`**
+Gets detailed subscription status for a specific subscription group.
+
+
+Check entitlements before showing paywalls to avoid presenting upgrade prompts to users who already have premium access.
+
+
## Fallbacks and Loading Budgets
If a paywall has not completed downloading when you attempt to present it, a loading state can show.