Hello. I want functionality in my iOS widgets to only be available for subscribers and it’s not clear at all to me how to accomplish that.
This page describes how to “enable data sharing between the main app and extensions”. So I’m assuming, but am not 100% sure, that means that Purchases.configure would be called by both the main and the widgets. And since they share a UserDefaults area they’ll know the same things. The SwiftUI Magic Weather app doesn’t seem to have widgets so I have nothing to go on. If this is correct where do I call Purchases.configure from the extension? The @main struct for WidgetBundle doesn’t seem to use a .init like a standard struct for a SwiftUI View. Maybe in an .onAppear attached to the WidgetEntryView?
I also have another question. In the scenario where the subscription expired BUT it auto-renewed would calling Purchases.shared.customerInfo() be sufficient for checking entitlements or is it a requirement to call Purchases.shared.getCustomerInfo instead?