-
Notifications
You must be signed in to change notification settings - Fork 5
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
Subscription Status Persistence #5
Comments
In fact, these persistence methods are still useful. A simple example is, suppose there is a permanently purchased in-app purchase item such as a song. After the purchase is completed, the user can listen to the music at any time. When there is a network, your software verifies if the user purchased this music through network in the background. However, the situation is different when the user is on a plane. In theory, the user can listen to the song when there is no network, because it is a permanent purchase, but your software needs to be connected to the Internet to complete the verification. If you store the purchase results inside the software, users can also listen to the song when there is no network. |
Thank you. This is very helpful. Can you provide an example of how to extend the sample code you provided to persist subscription status? Ive looked at a number of tutorials for this but they are not based on the new APIs. Also, I think I might have found a bug in the code to determine subscription status, but it's possible that I am missing something. I will file a separate issue outlining that. Thanks again, and any suggestion on how to persist subscription status is appreciated! |
Hi, I don't have much time recently, so for the bug review I won't regard it as the first thing but I will review it as soon as possible. You can find the official documentation and official code about |
Thanks for the follow-up. Can you explain the following statement?
Wouldn't the following ProductSubscription status function code fragment catch an expired subscription and report status as .notSubscribed ?
I may be misunderstanding your comment. Thoughts? |
I mean the code from Apple Backyard Birds: Building an app with SwiftData and widgets has one problem that I think it might be a bug. When the subscription expired, the view does not update to the not subscribed view, it still shows the last subscription plan. |
I see. Thank you. I'll check it out. |
Have you check Apple's code? Any thoughts? |
Thank you for your very helpful review, commentary and example code for these StoreKit changes. They have been very helpful in understanding and using the new views and APIs.
One thing that is still unclear to me is if the new views, apis and .subscriptionStatusTask modifier eliminates the need to persist subscription status using AppStorage, Keychain or App Receipts. Can you share your thoughts on this?
The text was updated successfully, but these errors were encountered: