16

I want to open ios setting app from my app. the settings destination is [ settings => notification => myapp ]. to turn on & turn off push notification.

There are some documents about how to link to settings, but I don't know how to open deep link. (notification => myapp).

How can I do this?

JuntaeKim
  • 5,364
  • 15
  • 54
  • 97

7 Answers7

32

You can deep-link referencing the settings's index like so:

Linking.openURL('app-settings:')

Above method only for IOS

Arunkumar
  • 1,555
  • 1
  • 14
  • 25
14

Since React Native 0.60 to open App settings use:


import { Linking } from 'react-native';

Linking.openSettings();

Open the Settings app and displays the app’s custom settings, if it has any.

Works for Android and iOS

B. Mohammad
  • 1,320
  • 6
  • 24
5

Use Linking.openURL. For example, below is how to check and open 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:')
  }
}
onmyway133
  • 38,911
  • 23
  • 231
  • 237
1

To access specific settings screens, try this: Linking.openURL("App-Prefs:root=WIFI"); Linking to app-settings only opens the settings for the Reference: iOS Launching Settings -> Restrictions URL Scheme (note that prefs changed to App-Prefs in iOS 6)

Julian K
  • 1,453
  • 2
  • 17
  • 19
1

Try this one for Open Specific System URL - Linking.openURL('App-Prefs:{3}')

Yatin
  • 2,348
  • 6
  • 20
  • 38
0

try this

Linking.openURL('app-settings://notification/myapp')
Govan
  • 940
  • 1
  • 10
  • 11
0

for iOS 14, this is how i open location service settings

Linking.openURL('App-Prefs:Privacy&path=LOCATION')

tested in react native 0.63.4

Abid Khairy
  • 371
  • 3
  • 7