Unsubscribe from auto-renew using Swift

I want to create a button where a user can unsubscribe from an automatic renewal (or redirect to the App Store).
Is this possible if the user does not have to go through the entire purchase process first? If so, how would you do it?
Any thoughts on this subject would be greatly appreciated!

+12
source share
3 answers

From Apple Guide Programming Guide for App Purchases -

Instead of coding your own subscription management interface, your application may open the following URL:

https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions Opening this URL launches the iTunes or iTunes Store, and then displays the Manage Subscription page.

So, just create a button that launches this url.

UIApplication.sharedApplication().openURL(NSURL(string: "https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions")!) 
+25
source

As mentioned in the documentation: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscription.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")!) 
+4
source

iOS 10 and above

 UIApplication.shared.open(URL(string: "https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions")!, options: [:], completionHandler: nil) 
0
source

All Articles