0

Out of all the other posts about this topic I still fail to find how to properly execute this.

I have many apps from the iOS App Store that has button to "Manage my subscription" which links directly to Settings -> iCloud -> Subscriptions page.

I'm trying to use React Native's Linking function to do so ie.

import { Linking } from 'react-native';
Linking.openURL('App-prefs:root=APPLE_ACCOUNT&path=SUBSCRIPTIONS');

But it only opens the main Settings page. I tried several different URLs to test if I could open other pages of the Settings app without any luck. (Got the Settings app's URLs from https://github.com/FifiTheBulldog/ios-settings-urls)

I read in a few posts that I need to tweak my XCode project's settings to add a custom URL handler but those answers seem outdated. I have also read that my app could get rejected because of this but as I said, I have many apps that I use that does specific pages of the iOS Settings app so I don't think it's a problem for Apple.

I'm looking for a definitive answer to this.

Tommy B.
  • 3,591
  • 14
  • 61
  • 105
  • You should not attempt to open a preferences screen directly. Using preferences urls is considered private api and will most likely result in your app being rejected. The duplicate provides details on various ways to provide subscription management, by either linking to the App Store or using StoreKit to provide subscription management without leaving your app. – Paulw11 Jan 17 '23 at 20:02

1 Answers1

1

For iOS 14 and over the URL format has changed. The root= part should be removed.

For iOS 14 the new format is:

Linking.openURL('App-prefs:APPLE_ACCOUNT&path=SUBSCRIPTIONS');

And for iOS 13 the format was:

Linking.openURL('App-prefs:root=APPLE_ACCOUNT&path=SUBSCRIPTIONS');

Found the answer in this comment here: Opening the Settings app from another app

Tommy B.
  • 3,591
  • 14
  • 61
  • 105