StoreKit 2 – How to properly use auto-renewable subscriptions?
I would like to implement an in-app auto-renewing subscription to open up “Pro” options for my app if a user chooses. The user would be able to choose from a monthly or yearly subscription version. I have looked at countless videos, doc, and StackOverflow posts on this but I’m not sure that I understand the correct way to do this via the new StoreKit 2 framework additions. From various WWDC videos, it would seem that it’s now as simple as using SubscriptionStoreView and then utilizing the modifiers .onInAppPurchaseCompletion, .subscriptionStatusTask, and/or .manageSubscriptionsSheet. It sounded to me like everything, including purchases and verifying transactions, is handled automatically for auto-renewing subscriptions. When testing my app, I can bring up my store view with no problem and make purchases with the simulator. That being said however, I am finding it fairly difficult to understand exactly what I need to do in order to make this all work correctly. Am I right about just using SubscriptionStoreView and the above modifiers? Do I still need to look at entitlements or verify transactions? What other “business logic” is needed? Can anyone verify how this is all supposed to work now for auto-renewing subscriptions? – a general flow with what is supposed to happen would be great. I know this may seem kind of basic for some of you that have already worked with StoreKit previously but this is all very new for me. I definitely don’t want to release my app and find out that I missed something critical. Any help would be greatly appreciated. Thanks!