Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native Open settings through Linking.openURL in IOS

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?

like image 630
ton1 Avatar asked Jun 16 '17 06:06

ton1


People also ask

How do you open a link in React Native?

To open a URL in default web browser with React Native, we can use the Linking. openURL method.


2 Answers

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

Linking.openURL('app-settings:')

Above method only for IOS

like image 198
Arunkumar Avatar answered Sep 19 '22 08:09

Arunkumar


Since React Native 0.60 to open App settings use:


import { Linking } from 'react-native';

Linking.openSettings();

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

Works for Android and iOS

like image 31
B. Mohammad Avatar answered Sep 21 '22 08:09

B. Mohammad