Code Samples
Implementing and handling mobile subscriptions can be tiresome. Take a look at the code samples below to see some useful subscription implementation cases. Let us know if you have any questions!
A customer already used the free trial offer.
You can check if this is the case and provide him with payment options, excluding the free-trial.
Qonversion.checkUser({ result in
guard let trialSubscription = result.allProducts
.first(where: { $0.state == .trial }) else { return }
switch trialSubscription.status {
case .active:
print("Trial still active")
case .cancelled:
print("Trial was cancelled")
default: break
}
}) { _ in
}
Last updated
Was this helpful?