Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opening specific iOS settings page using React Native's Linking function [duplicate]

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.

like image 225
Tommy B. Avatar asked Apr 17 '26 22:04

Tommy B.


1 Answers

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

like image 146
Tommy B. Avatar answered Apr 20 '26 15:04

Tommy B.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!