【问题标题】:React Native Expo iOS app - trying to modify info.plistReact Native Expo iOS 应用程序 - 尝试修改 info.plist
【发布时间】:2019-08-26 12:45:38
【问题描述】:

我在 Expo 中设置了一个 React Native 应用程序。

我需要修改 info.plist,但这样做时遇到问题。

首先,我在任何地方都找不到 info.plist。 基于Expo docs 和其他SO question,解决方法是在我的app.json 文件中添加一个“infoPlist”键。我已经这样做了,它看起来像这样:

"infoPlist": {
      "NSAppTransportSecurity": {
        "blah.s3.amazonaws.com": {
          "NSExceptionAllowsInsecureHTTPLoads": true,
          "NSRequiresCertificateTransparency": false,
          "NSIncludesSubdomains": true
        }
      }
    }

但是,当我尝试编译应用程序(通过运行“expo start”或“expo publish”)时,我收到以下错误:

错误:验证 app.json 中的字段时出现问题。见https://docs.expo.io/versions/v30.0.0/guides/configuration.html 不应有额外的属性“infoPlist”。

关于如何解决这个问题的任何想法?

【问题讨论】:

    标签: ios react-native plist expo info.plist


    【解决方案1】:

    infoPlist 属性需要添加到 ios 部分中(因为它对 Android 没有影响)。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-09-06
    • 2023-02-02
    • 2019-02-23
    • 1970-01-01
    • 2020-12-06
    • 1970-01-01
    • 2016-02-20
    相关资源
    最近更新 更多