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?

+7


source to share


5 answers


You can link deeply to the settings index like so:

Linking.openURL('app-settings:')

      



The above method is for IOS only

+19


source


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:')
  }
}

      

+5


source


Starting with React Native 0.60, to open the app preferences use:

Linking.openSettings()

+1


source


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)

0


source


Try this option for the URL of an open specific system - Linking.openURL ('App-Prefs: {3}')

0


source







All Articles