Skip to content

Commit

Permalink
chore(LinkingExample): Update external URLs description (#33023)
Browse files Browse the repository at this point in the history
Summary:
Update LinkingExample "Open external URLs" description to mitigate confusion about opening custom schemes in the simulator when testing, as suggested by Luna here #32962 (comment)

## Changelog

[Internal] [Changed] - Update LinkingExample "Open external URLs" description

Pull Request resolved: #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
  • Loading branch information
gabrieldonadel authored and facebook-github-bot committed Feb 2, 2022
1 parent eb08af5 commit f185d42
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/rn-tester/js/examples/Linking/LinkingExample.js
Expand Up @@ -33,7 +33,13 @@ class OpenURLButton extends React.Component<Props> {
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`,
);
}
});
};
Expand Down Expand Up @@ -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<typeof IntentAndroidExample> {
return <IntentAndroidExample />;
},
Expand Down

0 comments on commit f185d42

Please sign in to comment.