Change original Open options via Linking.openURL in IOS
I want to open the ios settings app from my app. destination of settings [settings => notification => myapp]. to enable or disable push notification.
There are some docs on how to link to settings, but I don't know how to open a deep link. (notification => myapp).
How can i do this?
source to share
Use Linking.openURL
. For example, below shows how to check and open the Health app on iOS.
import { Linking } from 'react-native'
async goToSettings() {
const healthAppUrl = 'x-apple-health://'
const canOpenHealthApp = await Linking.canOpenURL(healthAppUrl)
if (canOpenHealthApp) {
Linking.openURL(healthAppUrl)
} else {
Linking.openURL('app-settings:')
}
}
source to share
To access specific settings screens, try the following:
Linking.openURL("App-Prefs:root=WIFI");
Linking with app-settings
only opens settings for Link: iOS Launch Settings -> URL Scheme Restrictions (Note prefs
changed to App-Prefs
in iOS 6)
source to share