Skip to main content

How do I ensure entitlements.isActive is false when the user cancels transaction?

  • May 8, 2022
  • 1 reply
  • 51 views

Forum|alt.badge.img+2

Good day…

 

I am trying to ensure that when a user cancels their transaction (ie. is shown the iOS wallet / purchase sceen, clicks cancel) they are not provided with benefits of a subscribed user. At this time, I am following the suggestion of the example weather app which uses the below method…

 

@Published var customerInfo: CustomerInfo? { didSet subscriptionActive = customerInfo?.entitlements[entitlementID]?.isActive == true }}

How is a subscription active if they have cancelled the transaction and the transaction is nil?

 

(lldb) po customerInfo?.entitlements["hb-2022-premium"]?.isActive

▿ Optional<Bool>

  - some : true

 

(lldb) po transactionCancelled

true

 

(lldb) po transaction

nil

This post has been closed for comments

1 reply

Forum|alt.badge.img+1
  • New Member
  • 1 reply
  • March 6, 2023

Check the login method, there is a chance that you login user with the template name (“not_found” or something like that) which has the subscription and sdk gives the user premium content.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings