如何使用expo删除ios的权限



我有一个使用expo的应用程序,但是我想从de infoplist中删除NSMicrophoneUsageDescription。

使用此命令expo config --type introspect我得到了

ios: {
....
config: {
....
},
infoPlist: {
....
NSCameraUsageDescription: 'Allow $(PRODUCT_NAME) to access your camera',
NSPhotoLibraryUsageDescription: 'Allow $(PRODUCT_NAME) to access your photos',
NSMicrophoneUsageDescription: 'Allow $(PRODUCT_NAME) to access your microphone',
...
}

我的包。json依赖性

"dependencies": {
"@expo/config": "^6.0.16",
"@react-native-community/netinfo": "6.0.2",
"@react-native-community/picker": "^1.8.1",
"@react-navigation/elements": "^1.3.3",
"@react-navigation/native": "^6.0.6",
"@react-navigation/native-stack": "^6.2.5",
"@react-navigation/stack": "^6.0.11",
"@reduxjs/toolkit": "^1.6.2",
"@sentry/react-native": "^3.4.3",
"@stripe/stripe-react-native": "0.2.2",
"axios": "^0.24.0",
"date-fns": "^2.28.0",
"dotenv": "^16.0.0",
"expo": "~43.0.2",
"expo-app-loading": "~1.2.1",
"expo-apple-authentication": "~4.0.3",
"expo-application": "~4.0.0",
"expo-auth-session": "~3.4.2",
"expo-clipboard": "~2.0.3",
"expo-constants": "~12.1.3",
"expo-crypto": "~10.0.3",
"expo-dev-client": "~0.6.3",
"expo-device": "~4.0.3",
"expo-document-picker": "~10.0.3",
"expo-font": "~10.0.3",
"expo-image-picker": "~11.0.3",
"expo-linear-gradient": "^10.0.3",
"expo-linking": "~2.4.2",
"expo-localization": "~11.0.0",
"expo-notifications": "~0.13.3",
"expo-random": "~12.0.1",
"expo-secure-store": "~11.0.3",
"expo-status-bar": "~1.1.0",
"expo-updates": "~0.10.15",
"expo-web-browser": "~10.0.3",
"firebase": "^9.5.0",
"formik": "^2.2.9",
"husky": "^7.0.4",
"js-base64": "^3.7.2",
"jwt-decode": "^3.1.2",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-app-intro-slider": "^4.0.4",
"react-native-countdown-circle-timer": "^3.0.9",
"react-native-country-picker-modal": "^2.0.0",
"react-native-gesture-handler": "^1.10.3",
"react-native-get-random-values": "~1.7.0",
"react-native-global-props": "^1.1.5",
"react-native-paper": "^4.12.2",
"react-native-paper-dates": "^0.8.7",
"react-native-phone-number-input": "^2.1.0",
"react-native-picker-select": "^8.0.4",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.8.0",
"react-native-step-indicator": "^1.0.3",
"react-native-svg": "^12.1.1",
"react-native-toast-message": "^2.1.1",
"react-native-vector-icons": "^9.0.0",
"react-native-web": "0.17.1",
"react-native-webview": "11.13.0",
"react-redux": "^7.2.6",
"redux-logger": "^3.0.6",
"redux-saga": "^1.1.3",
"sentry-expo": "^4.2.0",
"ts-interface-builder": "^0.3.2",
"ts-interface-checker": "^1.0.2",
"uuid": "^8.3.2",
"yup": "^0.32.11"
},

所以,我想删除未使用的权限NSMicrophoneUsageDescription但我不知道怎么做,你能帮我吗?

我阅读了expo的权限文档,但它说插件有自己的权限配置,但没有说要删除它们https://docs.expo.dev/guides/permissions/

我假设你想要部署你的应用程序。如果你没有在你的整个app.js中请求权限,你不必做任何事情来删除一般的权限。

根据我的经验,苹果商店连接仍然会批准你的应用程序。在苹果商店下载页面上,描述不会显示任何需要的权限。

如果我猜错了,你只是想删除权限,我建议你退出应用程序。它会给你更大的灵活性来控制infoPlist。

这个问题已经解决了,将SDK更新到45,并将expo-image-picker更新到最新版本,这里你可以在app.json中修改如下

[
"expo-image-picker",
{
"microphonePermission": false
}
]

相关内容

  • 没有找到相关文章

最新更新