【问题标题】:is this the way to add string in infoplist file with expo bare workflow in sdk 39? #ReactNative这是在 sdk 39 中使用 expo 裸工作流在 infoplist 文件中添加字符串的方法吗? #ReactNative
【发布时间】:2020-11-07 18:48:25
【问题描述】:
{
  "expo": {
    "name": "Light",
    "slug": "Light",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "automatic",
    "ios": {
      "userInterfaceStyle": "automatic",
      "bundleIdentifier": "com.ShivBaapYaadHai.Light",
      "buildNumber": "1.5.0",
      "infoPlist": {
        "NSCameraUsageDescription": "Enable Camera Acess so that you can record  Videos",
        "NSMicrophoneUsageDescription": "Enable Microphone Access so that you can start recording audio ",
        "NSPhotoLibraryUsageDescription": "Enable Camera Roll Access so that you can select Other Videos from Camera Roll"
      }
    },
    "android": {
      "userInterfaceStyle": "automatic",
      "package": "com.ShivBabaYaadHai.Light",
      "versionCode": 1
    },
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "web": {
      "favicon": "./assets/favicon.png"
    }
  }
}

这是我的 app.json 文件,所以这是在 expo 裸工作流中添加 infoplist 文件的方法吗?因为我需要在系统向用户询问权限时添加一些字符串。

【问题讨论】:

  • 您找到解决方案了吗?

标签: react-native permissions expo info-plist


【解决方案1】:

是的,你明白了。这与我的 app.json 的形状相同,它设置 expo.ios.infoPlist 并请求类似的权限。

【讨论】:

  • 你的意思是你添加了这个并且你在提交给苹果时得到了同样的错误?在那种情况下,我不太确定。我的字符串更具体地说明了需要每个特定权限的确切用例(例如“我想使用相机来支持应用程序中的此功能”)
  • 不不,我没有收到任何错误。我的意思是说它没有改变警告框中的任何消息。我在 infoplist 文件中添加的字符串未显示在警报框上。这个字符串没有出现在警告框中,也没有给出任何错误。它只是不以这种方式工作。
猜你喜欢
  • 1970-01-01
  • 2018-12-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-03-10
  • 2021-12-26
  • 1970-01-01
相关资源
最近更新 更多