首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我怎样才能在苹果店检查哪些世博会套餐需要“NSPhotoLibraryUsageDescription”?

我怎样才能在苹果店检查哪些世博会套餐需要“NSPhotoLibraryUsageDescription”?
EN

Stack Overflow用户
提问于 2022-09-28 08:22:33
回答 1查看 38关注 0票数 0

我刚向苹果商店提交了我的第一个ios应用程序,收到的回复是:

代码语言:javascript
复制
We identified one or more issues with a recent delivery for your app, "XXXXX" 0.0.2 (1). Please correct the following issues, then upload again.

ITMS-90683: Missing Purpose String in Info.plist - Your app‘s code references one or more APIs that access sensitive user data. The app‘s Info.plist file should contain a NSPhotoLibraryUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources

我明白这个错误,但我真的很惊讶。我根本不看摄像机。下面是我的负责人的名单-有没有任何方法来检查其中哪一个需要这个权限?

一般来说,我的应用程序是基于语音到文本,文本到语音,所以我希望麦克风的权限是障碍,但不是摄像头的障碍。

代码语言:javascript
复制
"dependencies": {
    "@expo/vector-icons": "^13.0.0",
    "@expo/webpack-config": "^0.17.0",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/slider": "4.2.3",
    "@react-native-voice/voice": "^3.2.4",
    "@react-navigation/native": "^6.0.12",
    "@react-navigation/native-stack": "^6.8.0",
    "async-memoize-one": "^1.1.2",
    "axios": "^0.27.2",
    "deepmerge": "^4.2.2",
    "expo": "~46.0.13",
    "expo-asset": "~8.6.1",
    "expo-av": "~12.0.4",
    "expo-dev-client": "~1.2.1",
    "expo-file-system": "~14.1.0",
    "expo-localization": "~13.1.0",
    "expo-splash-screen": "~0.16.2",
    "expo-status-bar": "~1.4.0",
    "i18n-js": "^4.1.1",
    "memory-cache": "^0.2.0",
    "mobx": "^6.6.2",
    "mobx-persist-store": "^1.1.2",
    "mobx-react": "^7.5.3",
    "moment": "^2.29.4",
    "p-throttle": "^5.0.0",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-native": "0.69.5",
    "react-native-heroicons": "^2.2.0",
    "react-native-safe-area-context": "4.3.1",
    "react-native-screens": "~3.15.0",
    "react-native-svg": "12.3.0",
    "react-native-version": "^4.0.0",
    "react-native-web": "~0.18.7",
    "react-native-xml2js": "^1.0.3",
    "react-test-renderer": "18",
    "twrnc": "^3.4.0",
    "expo-speech": "~10.3.0",
    "expo-constants": "~13.2.4",
    "react-native-gesture-handler": "~2.5.0",
    "expo-build-properties": "~0.3.0"
  },
  "devDependencies": {
    "@types/memory-cache": "^0.2.2",
    "@babel/core": "^7.12.9",
    "@types/jest": "^28.1.8",
    "@types/prop-types": "^15.7.5",
    "@types/react": "^18.0.17",
    "@types/react-dom": "^18.0.6",
    "@types/react-native": "~0.69.1",
    "@typescript-eslint/eslint-plugin": "^5.34.0",
    "@typescript-eslint/parser": "^5.34.0",
    "concurrently": "^7.3.0",
    "eslint": "^8.22.0",
    "eslint-config-prettier": "^8.5.0",
    "eslint-plugin-jest": "^26.8.7",
    "eslint-plugin-prettier": "^4.2.1",
    "eslint-plugin-react": "^7.30.1",
    "husky": "^8.0.1",
    "jest": "^26.6.3",
    "jest-expo": "^46.0.1",
    "lint-staged": "^13.0.3",
    "prettier": "^2.7.1",
    "rimraf": "^3.0.2",
    "typescript": "^4.8.3"
  },
EN

回答 1

Stack Overflow用户

发布于 2022-09-28 08:49:13

您应该在Info.plist中添加键-字符串对,这将解决以下问题:

代码语言:javascript
复制
<key>NSPhotoLibraryUsageDescription</key>
<string>Photo Library Access Warning</string>

编辑:

在我的应用程序的不同组件上,我也遇到了类似的问题。到目前为止,添加了所有这些键(在更新到Xcode8 8/iOS10 10之后):

代码语言:javascript
复制
<key>NSPhotoLibraryUsageDescription</key>
<string>This app requires access to the photo library.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app does not require access to the microphone.</string>
<key>NSCameraUsageDescription</key>
<string>This app requires access to the camera.</string>

签出此developer.apple.com链接以获取属性列表键引用的完整列表

完整列表:

苹果音乐:

代码语言:javascript
复制
<key>NSAppleMusicUsageDescription</key>
<string>My description about why I need this capability</string>

蓝牙:

代码语言:javascript
复制
<key>NSBluetoothPeripheralUsageDescription</key>  
<string>My description about why I need this capability</string>

日历:

代码语言:javascript
复制
<key>NSCalendarsUsageDescription</key>
<string>My description about why I need this capability</string>

照相机:

代码语言:javascript
复制
<key>NSCameraUsageDescription</key>
<string>My description about why I need this capability</string>

联系方式:

代码语言:javascript
复制
<key>NSContactsUsageDescription</key>
<string>My description about why I need this capability</string>

FaceID:

代码语言:javascript
复制
<key>NSFaceIDUsageDescription</key>
<string>My description about why I need this capability</string>

保健份额:

代码语言:javascript
复制
<key>NSHealthShareUsageDescription</key>
<string>My description about why I need this capability</string>

健康最新情况:

代码语言:javascript
复制
<key>NSHealthUpdateUsageDescription</key>
<string>My description about why I need this capability</string>

家庭工具包:

代码语言:javascript
复制
<key>NSHomeKitUsageDescription</key>
<string>My description about why I need this capability</string>

位置:

代码语言:javascript
复制
<key>NSLocationUsageDescription</key>
<string>My description about why I need this capability</string>

地点(总是):

代码语言:javascript
复制
<key>NSLocationAlwaysUsageDescription</key>
<string>My description about why I need this capability</string>

地点(使用时):

代码语言:javascript
复制
<key>NSLocationWhenInUseUsageDescription</key>
<string>My description about why I need this capability</string>

麦克风:

代码语言:javascript
复制
<key>NSMicrophoneUsageDescription</key>
<string>My description about why I need this capability</string>

运动(加速度计):

代码语言:javascript
复制
<key>NSMotionUsageDescription</key>
<string>My description about why I need this capability</string>

近场通信:

代码语言:javascript
复制
<key>NFCReaderUsageDescription</key>
<string>My description about why I need this capability</string>

图片库:

代码语言:javascript
复制
<key>NSPhotoLibraryUsageDescription</key>
<string>My description about why I need this capability</string>

照片库(只写访问):

代码语言:javascript
复制
<key>NSPhotoLibraryAddUsageDescription</key>
<string>My description about why I need this capability</string>

催复通知:

代码语言:javascript
复制
<key>NSRemindersUsageDescription</key>
<string>My description about why I need this capability</string>

Siri:

代码语言:javascript
复制
<key>NSSiriUsageDescription</key>
<string>My description about why I need this capability</string>

语音识别:

代码语言:javascript
复制
<key>NSSpeechRecognitionUsageDescription</key>
<string>My description about why I need this capability</string>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73878293

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档