React Native Webview with Custom URL
Recently I came across a problem that react native webview cannot open a deep link (Custom URL) with window.location.href. This problem only occurs on iOS (Android works just fine). It also work fine with regular URL (HTTP or HTTPs). After some extensive investigation, I found that we need to specify the custom URL in LSApplicationQueriesSchemes in Info.plist. This is an array
<key>LSApplicationQueriesSchemes</key>
<array>
<string>Custom URL</string>
</array>
Based on my research, I guess that react-native-webview might use canOpenURL() which require us to specify the key.
Environment:
OS: iOS
OS version: 14.5.1
react-native version: 0.62.2
react-native-webview version: 11.2.3