iphoneiossubscriptions

Is there an API to cancel an auto-renewable subscription?


I don't currently use any apps that have an in app subscription, so I am not sure what the UI looks like in iTunes when do an in app renewable subscription.

I assumed there was an api, given a receipt id or original transaction id, to cancel the auto-renewable subscription from within the application. It doesn't look like this exists.

Am I missing something or do users cancel auto-renewable subscription through their iTunes account settings? This just isn't the developer's responsibility?


Solution

  • Starting from iOS 15, there is new api for that: static func showManageSubscriptions(in scene: UIWindowScene)

    or even easier with SwiftUI: manageSubscriptionsSheet(isPresented:)

    Documentation here: https://developer.apple.com/documentation/storekit/appstore/3803198-showmanagesubscriptions

    For SwiftUI: https://developer.apple.com/documentation/swiftui/view/managesubscriptionssheet(ispresented:)