Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
Post marked as unsolved with 2 replies, 0 views
Fortunately, I found a solution! A @MainActor static func showManageSubscriptions(in scene: UIWindowScene) async throws suspends the task until the user selects "Done" or "Cancel" in the manage subscription screen, so you can manually check the updated state in the next line.
Task {
do {
// The method suspends the execution until the user selects "Done" or "Cancel"
try await AppStore.showManageSubscriptions(in: view.window!.windowScene!)
// The line is executed after dismissing the screen. You can check the latest state of your app's subscription, then update your UI.
await checkAndUpdateAppSubscriptionStateI()
} catch let storeKitEerror as StoreKitError {
// Error handling
}
}