From f185d42619cd14d0b195670c0a422bd14bec20bb Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Dall'Agnol Date: Wed, 2 Feb 2022 07:16:21 -0800 Subject: [PATCH] chore(LinkingExample): Update external URLs description (#33023) Summary: Update LinkingExample "Open external URLs" description to mitigate confusion about opening custom schemes in the simulator when testing, as suggested by Luna here https://github.com/facebook/react-native/issues/32962#issuecomment-1026018822 ## Changelog [Internal] [Changed] - Update LinkingExample "Open external URLs" description Pull Request resolved: https://github.com/facebook/react-native/pull/33023 Test Plan: 1. Build RNTester iOS app 2. Head to the APIs example, Linking -> "Open external URLs" https://user-images.githubusercontent.com/11707729/152087644-7e95692c-5180-465b-9fc8-2a637a091deb.mov Reviewed By: cortinico Differential Revision: D33941963 Pulled By: dmitryrykun fbshipit-source-id: 5f58d7f71aee61518b0b8fd92d7b78ac8bff4d4b --- .../rn-tester/js/examples/Linking/LinkingExample.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/rn-tester/js/examples/Linking/LinkingExample.js b/packages/rn-tester/js/examples/Linking/LinkingExample.js index a33a5b20be4..2f84d7c5e0e 100644 --- a/packages/rn-tester/js/examples/Linking/LinkingExample.js +++ b/packages/rn-tester/js/examples/Linking/LinkingExample.js @@ -33,7 +33,13 @@ class OpenURLButton extends React.Component { if (supported) { Linking.openURL(this.props.url); } else { - console.log("Don't know how to open URI: " + this.props.url); + console.log( + `Don't know how to open URI: ${ + this.props.url + }, ensure you have an app installed that handles the "${ + this.props.url.split(':')?.[0] + }" scheme`, + ); } }); }; @@ -134,6 +140,8 @@ exports.description = 'Shows how to use Linking to open URLs.'; exports.examples = [ { title: 'Open external URLs', + description: + 'Custom schemes may require specific apps to be installed on the device. Note: Phone app is not supported in the simulator.', render: function (): React.Element { return ; },