简体   繁体   English

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

[英]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.

相关问题 LSApplicationQueriesSchemes下的Info.plist中缺少fbauth2,iOS 9.0也是必需的 - fbauth2 is missing from your Info.plist under LSApplicationQueriesSchemes and is required for iOS 9.0 为什么要在 info.plist 文件中添加图标? - Why to add icons in info.plist file? 如何在 React Native 项目中向 info.plist 动态添加权限键和值? - How do I dynamically add permission keys and values to info.plist in a react native project? Xcode:如何将密钥添加到生成的 Info.plist 文件中(或合并生成的和现有的 Info.plist)? - Xcode: How to add key into generated Info.plist file (or merge generated and existing Info.plist)? React Native Expo iOS应用程序 - 尝试修改info.plist - React Native Expo iOS app - trying to modify info.plist 如何在弹出的 react-native 应用程序中配置 Info.plist 文件使用 expo sdk - How to configure Info.plist file in ejected react-native app uses expo sdk 使用expo SDK的react native ios app的Info.plist文件 - Info.plist file for react native ios app using expo SDK 由于来自appstore的Info.plist文件中缺少目的字符串,拒绝响应本机iOS应用程序 - Rejected react native iOS app due to Missing Purpose String in Info.plist File from appstore 在react native中编辑后无法保存info.plist - info.plist can not be saved after editing in react native 如何在 react-native 项目中保存 info.plist 中的更改 - How to save changes in info.plist in react-native project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM