[英]Add file to LSApplicationQueriesSchemes in your Info.plist WebView React Native
I'm implementing a payment platform in the app that I'm building so the payment form is shown on a WebView
Now the form loads okay, but when I change something like I select a payment method from the drop-down web page loads to show options accordingly.我正在构建的应用程序中实现支付平台,因此支付表单显示在
WebView
现在表单加载正常,但是当我更改类似 I select 之类的内容时,支付方式从下拉 Z2567A5EC9305EB7AC2C9DZ840 页面加载到相应地显示选项。 But after that refresh it takes me back to the original state as in the page was never changed and throws a warning that reads:但是在刷新之后,它让我回到原来的 state 因为页面中的内容从未更改过,并发出警告,内容如下:
Error opening URL: [Error: Unable to open URL: file:///private/var/containers/Bundle/Application/457E6674-DA77-4676-A2CF-3F21C9572B57/mnopqmobile.app/entry.asp.
打开 URL 时出错:[错误:无法打开 URL:file:///private/var/containers/Bundle/Application/457E6674-DA77-4676-A2CF-7/mnop.app/entry.Bq Add file to LSApplicationQueriesSchemes in your Info.plist.]
将文件添加到 Info.plist 中的 LSApplicationQueriesSchemes。]
While searching for this I've added this in my info.plist
file:在搜索这个时,我在
info.plist
文件中添加了这个:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>file://</string>
</array>
And here is the WebView
component:这是
WebView
组件:
<WebView
style={{ flex: 1 }}
useWebKit={true}
source={{ html: paymentGatewayHTMLResponse }}
startInLoadingState={true}
scrollEnabled={true}
javaScriptEnabled={true}
domStorageEnabled={true}
originWhitelist={["file://"]}
/>
But it still throws that warning and takes me back to the original page.但它仍然会发出警告并将我带回原始页面。
i got this warning too and i changed my code as follows and it worked.我也收到了这个警告,我按如下方式更改了我的代码并且它起作用了。
<Key>LSApplicationQueriesSchemes</Key>
<array>
<string>URL</string>
</array>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.