react-native-hyperlink icon indicating copy to clipboard operation
react-native-hyperlink copied to clipboard

Non Safari default browser links do not work

Open iamgerardm opened this issue 3 years ago • 3 comments

If your default browser is set to something aside from Safari -- links do not open.

To Reproduce Steps to reproduce the behavior:

  1. Download Chrome and set it as a default browser
  2. Tap a link

Expected behavior Links open

Smartphone (please complete the following information):

  • OS: 14+ -- maybe lower

iamgerardm avatar Nov 05 '20 16:11 iamgerardm

Hello @iamgerardm

After debugging the issue I found out that the "problem" was with Linking from RN returned not supported URL when the default browser is not Safari.

The solution for me was to configure my iOS app like this:

add https & http to LSApplicationQueriesSchemes in Info.plist Originally posted by @andrzejbe in #https://github.com/facebook/react-native/issues/30133#issuecomment-705563026_

Hope this helps.

cedancp avatar Nov 24 '20 14:11 cedancp

Hello @iamgerardm

After debugging the issue I found out that the "problem" was with Linking from RN returned not supported URL when the default browser is not Safari.

The solution for me was to configure my iOS app like this:

add https & http to LSApplicationQueriesSchemes in Info.plist Originally posted by @andrzejbe in #facebook/react-native#30133 (comment)_

Hope this helps.

Hello @cedancp

Can you share the snippet of info.plist to see how you add the suggested entry?

Regards

debiff avatar Nov 26 '20 16:11 debiff

Hello @iamgerardm After debugging the issue I found out that the "problem" was with Linking from RN returned not supported URL when the default browser is not Safari. The solution for me was to configure my iOS app like this:

add https & http to LSApplicationQueriesSchemes in Info.plist Originally posted by @andrzejbe in #facebook/react-native#30133 (comment)_

Hope this helps.

Hello @cedancp

Can you share the snippet of info.plist to see how you add the suggested entry?

Regards

This is the key of info.plist where I added the schemes

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>https</string>
    <string>http</string>
</array>

cedancp avatar Nov 30 '20 20:11 cedancp