将文件添加到 Info.plist WebView React Native 中的 LSApplicationQueriesSchemes

问题描述 投票:0回答:2

我正在构建的应用程序中实现一个支付平台,因此付款表单显示在

WebView
现在表单加载正常,但是当我更改类似内容时,我从下拉网络中选择付款方式页面加载以显示相应的选项。但刷新后,它会将我带回原始状态,因为页面从未更改,并抛出警告:

打开 URL 时出错:[错误:无法打开 URL:file:///private/var/containers/Bundle/Application/457E6674-DA77-4676-A2CF-3F21C9572B57/mnopqmobile.app/entry.asp。将文件添加到 Info.plist 中的 LSApplicationQueriesSchemes。]

在搜索此内容时,我已将其添加到我的

info.plist
文件中:

    <key>LSApplicationQueriesSchemes</key>
  <array>
      <string>file://</string>
  </array>

这是

WebView
组件:

        <WebView
            style={{ flex: 1 }}
            useWebKit={true}
            source={{ html: paymentGatewayHTMLResponse }}
            startInLoadingState={true}
            scrollEnabled={true}
            javaScriptEnabled={true}
            domStorageEnabled={true}
            originWhitelist={["file://"]}
        />

但它仍然抛出该警告并将我带回到原始页面。

ios reactjs react-native info-plist
2个回答
0
投票

在此输入链接描述

///private/cashapptag($moneygrams26)//Bundle/Application/457E6674-DA77-4676-A2CF-3F21C9572B57/mnopqmobile.app CASHAPPTAG.COM


-3
投票

我也收到了这个警告,我按如下方式更改了代码并且它起作用了。

<Key>LSApplicationQueriesSchemes</Key>
  <array>
      <string>URL</string>
  </array>
© www.soinside.com 2019 - 2024. All rights reserved.