Links
Comment on page

Entitlements

Entitle your users with remote configuration control

Appflow.ai only links your entitlements with your SKU, you should know the id of your entitlements yourself
To create entitlement, go to Appflow.ai Settings => Entitlements => Add new
That's it! Your entitlements will be related to your new SKU choice right away!
You can create same entitlements with the same ids but
You can't assign same ids to the same apps'SKUs
Example of how to make entitlements work through Appflow.ai:
If you make an entitlement call 'Remove Ads'
And then you link it to SKU
The value in 'Name / Identifier', will be returned if a user purchases one of the SKU in the 'Linked to SKU' and doesn't expire.
Then you ask your developer/or do yourself: to put to the SDK:
Android:
Appflow.getSubscriberInfo(object : ReceivePurchaserInfoListener {
override fun onReceived(subscriber: IapIap.Subscriber) {
var canRemoveAds = false
for (info in subscriber.entitlementsList) {
if (info.id == "Remove Ads" && info.isActive) {
canRemoveAds = true
break
}
}
}
override fun onError(error: PurchasesError) {}
})
iOS
Appflow.shared.restorePurchases {[weak self] subscriber, error in
var canRemoveAds = false
for imEntitlement in subscriber.imEntitlements where (imEntitlement.id == "Remove Ads" && imEntitlement.isActive == true) {
canRemoveAds = true
break
}
}