Skip to main content

iOS SDK Models

Interfaces

AdaptyOnboarding

Information about an onboarding.

NameTypeDescription
placementAdaptyPlacementPlacement information for the onboarding
instanceIdentitystringUnique identifier of the onboarding configuration
variationIdstringAn identifier of a variation, used to attribute events to this onboarding
namestringName of the onboarding flow
remoteConfigAdaptyRemoteConfig (optional)Optional custom metadata for the onboarding
hasViewConfigurationboolWhether the onboarding has view configuration available
viewConfigurationAdaptyOnboarding.ViewConfigurationVisual configuration settings

AdaptyOnboardingScreen

NameTypeDescription
idStringUnique identifier for the screen
orderIntPosition of the screen in the flow
contentAdaptyOnboardingContentContent to display on the screen
actions[AdaptyOnboardingAction]Available actions for this screen

AdaptyOnboarding.ViewConfiguration

NameTypeDescription
responseLocaleAdaptyLocaleThe locale of the response
urlURLConfiguration URL for the onboarding

AdaptyPaywallProduct

An information about a product.

NameTypeDescription
adaptyProductIdstringUnique identifier of the product in Adapty
vendorProductIdstringUnique identifier of a product from App Store Connect or Google Play Console
paywallProductIndexintIndex of the product within the paywall
variationIdstringSame as variationId property of the parent AdaptyPaywall
paywallABTestNamestringSame as abTestName property of the parent AdaptyPaywall
paywallNamestringSame as name property of the parent AdaptyPaywall
subscriptionOfferAdaptySubscriptionOffer (optional)The active subscription offer for this product (introductory, promotional, or win-back)
webPaywallBaseUrlURL (optional)Base URL for web paywall functionality
currencyCodestring (optional)The currency code of the locale used to format the price of the product.
currencySymbolstring (optional)The currency symbol of the locale used to format the price of the product.
isFamilyShareableboolA Boolean value that indicates whether the product is available for family sharing in App Store Connect. (Will be false for iOS version below 14.0 and macOS version below 11.0).
localizedDescriptionstringA description of the product.
localizedPricestring (optional)The price's language is determined by the preferred language set on the device.
localizedSubscriptionPeriodstring (optional)The period's language is determined by the preferred language set on the device.
localizedTitlestringThe name of the product.
pricenumberThe cost of the product in the local currency.
regionCodestring (optional)The region code of the locale used to format the price of the product.
subscriptionGroupIdentifierstring (optional)The identifier of the subscription group to which the subscription belongs. (Will be nil for iOS version below 12.0 and macOS version below 10.14).
subscriptionPeriodAdaptyProductSubscriptionPeriod (optional)The period details for products that are subscriptions. (Will be nil for iOS version below 11.2 and macOS version below 10.14.4).

AdaptySubscriptionOffer

An information about a subscription offer.

NameTypeDescription
identifierstring (optional)Unique identifier of a discount offer for a product
offerTypeenumType of offer. Possible values are introductory, promotional, winBack
subscriptionPeriodAdaptyProductSubscriptionPeriodPeriod details for the offer
numberOfPeriodsnumberThe number of periods this product discount is available
paymentModeenumThe payment mode for this product discount. Possible values are payAsYouGo, payUpFront, freeTrial, unknown
localizedSubscriptionPeriodstring (optional)A formatted subscription period of a discount for a user's locale
localizedNumberOfPeriodsstring (optional)A formatted number of periods of a discount for a user's locale
pricenumberThe discount price in the local currency
currencyCodestring (optional)The currency code of the locale used to format the price of the product
localizedPricestring (optional)A formatted price of a discount for a user's locale

AdaptyProductSubscriptionPeriod

NameTypeDescription
unitAdaptyPeriodUnitA unit of time that a subscription period is specified in. The possible values are: day, week, month, year and unknown
numberOfUnitsnumberA number of period units

AdaptyPaywall.ViewConfiguration

NameTypeDescription
responseLocaleAdaptyLocaleThe locale of the response
urlURLConfiguration URL for the paywall

AdaptyProductIdentifier

(Flutter only)
A structured representation of a product identifier in the Flutter SDK, providing more information than simple string identifiers.

NameTypeDescription
vendorProductIdstringThe vendor product ID from the store (App Store Connect or Google Play Console).

AdaptyPaywall

An information about a paywall.

NameTypeDescription
placementAdaptyPlacementPlacement information for the paywall
instanceIdentitystringAn identifier of a paywall, configured in Adapty Dashboard
variationIdstringAn identifier of a variation, used to attribute purchases to this paywall
namestringPaywall name
remoteConfigAdaptyRemoteConfig (optional)A custom configuration configured in Adapty Dashboard for this paywall
hasViewConfigurationboolWhether the paywall has view configuration available
viewConfigurationAdaptyPaywall.ViewConfiguration (optional)View configuration for the paywall
vendorProductIdsarray of stringsArray of related products ids
webPaywallBaseUrlURL (optional)For more information, see the guide on how to implement a web paywall in your app.

AdaptyProfile

An information about a user's subscription status and purchase history.

NameTypeDescription
profileIdstringAn identifier of a user in Adapty
customerUserIdstring (Optional)An identifier of a user in your system
customAttributesdictionaryPreviously set user custom attributes with .updateProfile() method
accessLevelsdictionary<string, AccessLevel>The keys are access level identifiers configured by you in Adapty Dashboard. The values are Can be null if the customer has no access levels
subscriptionsdictionary<string, Subscription >The keys are product ids from a store. The values are information about subscriptions. Can be null if the customer has no subscriptions
nonSubscriptionsdictionary<string, [NonSubscription ]>The keys are product ids from the store. The values are arrays of information about consumables. Can be null if the customer has no purchases.

AdaptyProfile.AccessLevel

Information about the user's access level.

NameTypeDescription
idstringUnique identifier of the access level configured by you in Adapty Dashboard
isActivebooleanTrue if this access level is active. Generally, you can check this property to determine wether a user has an access to premium features
vendorProductIdstringAn identifier of a product in a store that unlocked this access level
storestringA store of the purchase that unlocked this access level. Possible values are `'app_store'
activatedAtDateTime when this access level was activated.
startsAtDate (optional)Time when this access level has started (could be in the future).
renewedAtDate (optional)Time when the access level was renewed.
expiresAtDate (optional)Time when the access level will expire (could be in the past and could be null for lifetime access).
isLifetimebooleanTrue if this access level is active for a lifetime (no expiration date)
willRenewbooleanTrue if this auto-renewable subscription is set to renew
isInGracePeriodbooleanTrue if this auto-renewable subscription is in the grace period
unsubscribedAtDate (optional)Time when the auto-renewable subscription was cancelled. Subscription can still be active, it just means that auto-renewal turned off. Will be set to null if the user reactivates the subscription.
billingIssueDetectedAtDate (optional)Time when billing issue was detected. Subscription can still be active. Would be set to null if a charge is made.
cancellationReasonstring (Optional)A reason why a subscription was cancelled. Possible values are `'voluntarily_cancelled'
isRefundbooleanTrue if this purchase was refunded
activeIntroductoryOfferTypestring (Optional)A type of an active introductory offer. If the value is not null, it means that the offer was applied during the current subscription period. Possible values: `'free_trial'
activePromotionalOfferTypestring (Optional)A type of an active promotional offer. If the value is not null, it means that the offer was applied during the current subscription period. Possible values `'free_trial'
activePromotionalOfferIdstring (Optional)An id of active promotional offer
offerIdstring (Optional)An id of active offer
startsAtDate (optional)Time when this access level has started (could be in the future)

AdaptyProfile.Subscription

Information about the user's subscription.

NameTypeDescription
storestringA store of the purchase that unlocked this subscription. Possible values are `'app_store'
vendorProductIdstringAn identifier of a product in a store that unlocked this subscription
vendorTransactionIdstringA transaction id of a purchase in a store that unlocked this subscription
vendorOriginalTransactionIdstringAn original transaction id of the purchase in a store that unlocked this subscription. For auto-renewable subscription, this will be an id of the first transaction in this subscription
isActivebooleanTrue if the subscription is active
isLifetimebooleanTrue if the subscription is active for a lifetime (no expiration date)
activatedAtDateTime when the subscription was activated.
renewedAtDate (optional)Time when the subscription was renewed.
expiresAtDate (optional)Time when the subscription will expire (could be in the past and could be null for a lifetime access).
startsAtDate (optional)Time when the subscription has started (could be in the future).
unsubscribedAtDate (optional)Time when the auto-renewable subscription was cancelled. Subscription can still be active, it means that auto-renewal is turned off. Would be null if a user reactivates the subscription
billingIssueDetectedAtDate (optional)Time when a billing issue was detected. Subscription can still be active
willRenewbooleanTrue if the auto-renewable subscription is set to renew
isInGracePeriodbooleanWhether the auto-renewable subscription is in a grace period
cancellationReasonstring (Optional)A reason why the subscription was cancelled. Possible values: `'voluntarily_cancelled'
isRefundboolTrue if the purchase was refunded
activeIntroductoryOfferTypestring (Optional)A type of an active introductory offer. If the value is not null, it means that the offer was applied during the current subscription period. Possible values: `'free_trial'
activePromotionalOfferTypestring (Optional)A type of an active promotional offer. If the value is not null, it means that the offer was applied during the current subscription period. Possible values: `'free_trial'
activePromotionalOfferIdstring (Optional)An id of an active promotional offer
offerIdstring (Optional)An id of active offer
isSandboxboolTrue if the product was purchased in a sandbox environment

AdaptyProfile.NonSubscription

Information about the user's non-subscription purchases.

NameTypeDescription
purchaseIdstringAn identifier of the purchase in Adapty. You can use it to ensure that you've already processed this purchase (for example tracking one time products)
vendorProductIdstringAn identifier of the product in a store
vendorTransactionIdstring (optional)Transaction ID in a store
storestringA store of the purchase. Possible values are `'app_store'
purchasedAtDateDate when the product was purchased
isRefundbooleanTrue if the purchase was refunded
isConsumablebooleanTrue if the product is consumable (should only be processed once)
isSandboxbooleanTrue if the product was purchased in a sandbox environment

AdaptySubscriptionUpdateParameters

(Android only)
Parameters to change one subscription to another.

NameTypeDescription
oldSubVendorProductIdstringThe identifier of the current subscription in Play Market that needs to be replaced.
ReplacementModeenumEnum that corresponds to BillingFlowParams.ProrationMode values.

AdaptyPlacement

Information about a placement configuration.

NameTypeDescription
idstringUnique identifier of the placement
audienceNamestringName of the audience for this placement
revisionnumberCurrent revision (version) of the placement
abTestNamestringParent A/B test name

AdaptyRemoteConfig

Information about remote configuration for a placement.

NameTypeDescription
localestringThe locale identifier
jsonStringstringA custom JSON string configured in Adapty Dashboard
dictionary[String: Any]?A custom dictionary configured in Adapty Dashboard (same as jsonString)