-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Dont show cancel path if lifetime subscription #4755
Conversation
RevenueCatUI/CustomerCenter/Views/ManageSubscriptionsButtonsView.swift
Outdated
Show resolved
Hide resolved
RevenueCatUI/CustomerCenter/Views/ManageSubscriptionsButtonsView.swift
Outdated
Show resolved
Hide resolved
RevenueCatUI/CustomerCenter/ViewModels/ManageSubscriptionsViewModel.swift
Outdated
Show resolved
Hide resolved
RevenueCatUI/CustomerCenter/Data/CustomerCenterConfigTestData.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another case I am thinking we shouldn't show the cancel path is if the product is a promotional. To detect a promotional, I've normally checked for the prefix of the product identifier. To test it, you can grant your user a promotional in the dashboard
Feel free to merge this and address that in another PR
@vegaro I'll add another ticket and apply that too |
### Motivation CANCEL should not be shown if the product is a lifetime product. ### Description This PR follows the same logic as Android, and filters out CANCEL if the product is lifetime: 1. Check entitlement 2. Subscription is false 3. Non subscription is true See RevenueCat/purchases-ios#4755
Motivation
Display only the paths that are relevant to the subscription
Description
Doing this in the backend requires some extra work, so for now we'll handle it in the client.
ManageSubscriptionsViewModel
has the relevant change. The other changes are just removing some unnecessary code, and re-organising stuff.