From b26f2772624c863c91fa1ff627b481c92d7562fb Mon Sep 17 00:00:00 2001 From: Utkarsh Date: Wed, 1 Sep 2021 00:18:08 -0700 Subject: [PATCH] Add Linking examples in rn-tester (#30547) Summary: Added examples to RNTester for the Linking API. ## Changelog [General] [Added] - Added example for openSettings() for Linking API. [General] [Added] - Added [LSApplicationQueriesSchemes](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW14) in info.plist with entries tel, telprompt, http, fb, geo Pull Request resolved: https://github.com/facebook/react-native/pull/30547 Test Plan: ![Screen Recording 2020-12-07 at 11 19 13 PM (1)](https://user-images.githubusercontent.com/16796008/102250807-05001580-3f2a-11eb-9ce0-58de4d6fca54.gif) Reviewed By: yungsters Differential Revision: D30559457 Pulled By: lunaleaps fbshipit-source-id: dba2721a9905ddb9ddd2b14141e5553bdf8880da --- packages/rn-tester/RNTester/Info.plist | 8 +++++++ .../js/examples/Linking/LinkingExample.js | 23 ++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/packages/rn-tester/RNTester/Info.plist b/packages/rn-tester/RNTester/Info.plist index 13573d49b86602..788e4d6193c8d5 100644 --- a/packages/rn-tester/RNTester/Info.plist +++ b/packages/rn-tester/RNTester/Info.plist @@ -2,6 +2,14 @@ + LSApplicationQueriesSchemes + + tel + telprompt + http + fb + geo + UIStatusBarStyle UIStatusBarStyleBlackTranslucent CFBundleDevelopmentRegion diff --git a/packages/rn-tester/js/examples/Linking/LinkingExample.js b/packages/rn-tester/js/examples/Linking/LinkingExample.js index 02f883a644dbd4..cd0c9eabf8ebe2 100644 --- a/packages/rn-tester/js/examples/Linking/LinkingExample.js +++ b/packages/rn-tester/js/examples/Linking/LinkingExample.js @@ -11,6 +11,7 @@ const React = require('react'); const { + Button, Linking, Platform, StyleSheet, @@ -48,6 +49,16 @@ class OpenURLButton extends React.Component { } } +class OpenSettingsExample extends React.Component { + openSettings() { + Linking.openSettings(); + } + + render() { + return