Checking Subscription Status

Check Premium Access

Returns true if user has active subscription or non-renewing lifetime purchase.

Use this method to determine whether or not user has active premium access. If you have consumable purchases, this method won't operate correctly, because Apphud SDK doesn't differ consumables from non-consumables.

🚧

Important Note

You should not use this method if you have consumable in-app purchases, like coin packs.

Apphud.hasPremiumAccess()
[Apphud hasPremiumAccess];
Apphud.hasPremiumAccess()
await Apphud.hasPremiumAccess();

Check Subscription Status

Returns true if user has active subscription.

Use this method to determine whether or not user has active premium subscription.

📘

Important

If you have non-consumable or consumable purchases, you should better use Apphud.isNonRenewingPurchaseActive(productIdentifier:) or Appud.hasPremiumAccess().

Apphud.hasActiveSubscription()
[Apphud hasActiveSubscription];
Apphud.hasActiveSubscription()
await Apphud.hasActiveSubscription();
await ApphudSdk.hasActiveSubscription();

Get Subscription Details

To get subscription object (which contains expiration date, autorenewal status, etc.) use the following method:

Apphud.subscription()
[Apphud subscription];
Apphud.subscription()
await Apphud.subscription();
await ApphudSdk.subscription();

🚧

Important Note

If user has more than one active subscription, this method will return the first subscription from the array. Consider using Apphud.subscriptions() method in this case.