Hello 👋! I'm trying to switch the business model in my app from premium to freemium, gracefully so that existing users aren't bothered. I'd like to provide newly-paywalled content for original paid users. For this to work, I need to use originalAppVersion in AppTransaction, and support iOS 16 at minimum. I've asked about originalAppVersion
earlier here.
I've upped to iOS 16 already, but I don't exactly know how to call AppTransaction.shared
to get originalAppVersion
. The issue lies in the fact that my app is based on SpriteKit, so the operative areas I have available to call AppTransaction
are ostensibly limited to AppDelegate
and GameViewController
.
I'm using the code from Supporting business model changes by using the app transaction, but if I place it in either GameViewController
or AppDelegate
, for example in application(_:didFinishLaunchingWithOptions:) or viewDidLoad(), I get an error concerning async/await. Now, I understand the gist of it: these are not asynchronous methods. So I'm trying to understand how to do it perhaps outside of these methods.
How do I call AppTransaction.shared (and fetch originalAppVersion) in a SpriteKit based app?