I want to create a button where a user can cancel a auto-renewal subscription (or get redirected to App Store).
Is that possible without the user having to go through the whole purchase process first? If it is, how would you go about doing it?
I want to create a button where a user can cancel a auto-renewal subscription (or get redirected to App Store).
Is that possible without the user having to go through the whole purchase process first? If it is, how would you go about doing it?
As mentioned in the documentation: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html#//apple_ref/doc/uid/TP40008267-CH7-SW19
So for Swift 3/4 just use this
UIApplication.shared.openURL(URL(string: "https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions")!)
December 2019
The correct URL is now https://apps.apple.com/account/subscriptions according to Apple's Handling Subscriptions Billing Documentation.
So just use:
UIApplication.shared.open(URL(string: "https://apps.apple.com/account/subscriptions")!)
April 2021
According to the Apple Document, the URL has been updated to
https://apps.apple.com/account/subscriptions
So the following code can be used to redirect the user to manage subscriptions page.
DispatchQueue.main.async {
UIApplication.shared.open(URL(string: "https://apps.apple.com/account/subscriptions")!, options: [:], completionHandler: nil)
}
From the Apple In-App Purchase Programming Guide -
So, simply create a button that launches that URL.