Cancel auto-renewal subscriptions with Swift
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")!)
From the Apple In-App Purchase Programming Guide -
Rather than needing to code your own subscription management UI, your app can open the following URL:
https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions Opening this URL launches iTunes or iTunes Store, and then displays the Manage Subscription page.
So, simply create a button that launches that URL.
UIApplication.shared.openURL(URL(string: "https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions")!)
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")!)