iOS개발/오류수정

[XCode] Missing Purpose String in Info.plist : NSCameraUsageDescription 에러

달님개발자 2022. 8. 8. 13:44
반응형

앱을 테스트 플라이트에 올렸는데, NSCameraUsageDescription 키가 없다고 오류 메일을 받았다.

 



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 NSCameraUsageDescription 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

Though you are not required to fix the following issues, we wanted to make you aware of them:


plist파일을 보자. 

NSCameraUsageDescription key가 없다. (이 앱에서는 카메라를 안쓰지만, 3rd party library에서 사용할수도 있어서 에러가 나온거 같다)

+ 키를 눌러서 빈 항목을 추가한다.

 

Key에 NSCameraUsageDescription 를 넣고 Value에 왜 이 권한을 사용하는지 이유를 적는다. (Value를 비워두면 안된다. 같은 에러 메일을 받게 된다.)

가끔 NSCameraUsageDescription키를 넣으면 Privacy - Camera Usage Description처럼 바뀌는 경우가 있는데, 둘은 똑같은 거다. (근데 언제 이렇게 바뀌는지는 모르겠다.)

다국어화를 할려면 InfoPlist.string에 NSCameraUsageDescription키를 넣고 value(설명글)을 추가하면 된다.

 

만약 InfoPlist.strings파일이 없으면 File-New-File...에서 "Strings File"을 선택해서 만들면 된다.

한국어 설명 문구 (그런데 이렇게 당연한 말을 적으면 리젝당할수 있다. 어떤 환경에서 왜 써야 하는지 자세히 적어라고 하는 리뷰어도 있다)

영어 설명 문구


한번은 NSCameraUsageDescription이 제대로 있는데도 안되었다. 

그럴땐 NSCameraUsageDescription키를 다시 추가해보자. 그럼 아래와  같이 덮어쓸거냐고 물어본다. 그럼 "Replace Existing Pair"를 하고 (확실히 하기 위해서 Clean Build Folder 및 XCode를 재시동하여) 다시 Archive해서 올려보자.

 

 


카메라말고도 다른키는 아래 리스트를 참고하자. Privacy Keys list

Privacy - Apple Music usage Description (NSAppleMusicUsageDescription) - Allows the developer to describe why the app wants to access the user's media library.
Privacy - Bluetooth Peripheral Usage Description (NSBluetoothPeripheralUsageDescription) - Allows the developer to describe why the app wants to access Bluetooth on the user's device.
Privacy - Calendars Usage Description (NSCalendarsUsageDescription) - Allows the developer to describe why the app wants to access the user's calendar.
Privacy - Camera Usage Description (NSCameraUsageDescription) - Allows the developer to describe why the app wants to access the device's camera.
Privacy - Contacts Usage Description (NSContactsUsageDescription) - Allows the developer to describe why the app wants to access the user's contacts.
Privacy - Health Share Usage Description (NSHealthShareUsageDescription) - Allows the developer to describe why the app wants to access the user's health data. For more information, please see Apple's HKHealthStore Class Reference.
Privacy - Health Update Usage Description (NSHealthUpdateUsageDescription) - Allows the developer to describe why the app wants to edit the user's health data. For more information, please see Apple's HKHealthStore Class Reference.
Privacy - HomeKit Usage Description (NSHomeKitUsageDescription) - Allows the developer to describe why the app wants to access the user's HomeKit Configuration Data.
Privacy - Location Always Usage Description (NSLocationAlwaysUsageDescription) - Allows the developer to describe why the app wants to always have access to the user's location.
[Deprecated] Privacy - Location Usage Description (NSLocationUsageDescription) - Allows the developer to describe why the app wants to access the user location. NOTE: This key has been deprecated in iOS 8 (and greater). Use NSLocationAlwaysUsageDescription or NSLocationWhenInUseUsageDescription instead.
Privacy - Location When In Use Usage Description (NSLocationWhenInUseUsageDescription) - Allows the developer to describe why the app wants to access the user's location while it is running.
[Deprecated] Privacy - Media Library Usage Description - Allows the developer to describe why the app wants to access to the user's media library. NOTE: This key has been deprecated in iOS 8 (and greater). Use NSAppleMusicUsageDescription instead.
Privacy - Microphone Usage Description (NSMicrophoneUsageDescription) - Allows the developer to describe why the app wants to access the devices microphone.
Privacy - Motion Usage Description (NSMotionUsageDescription) - Allows the developer to describe why the app wants to access the device's accelerometer.
Privacy - Photo Library Usage Description (NSPhotoLibraryUsageDescription) - Allows the developer to describe why the app wants to access the user's photo library.
Privacy - Reminders Usage Description (NSRemindersUsageDescription) - Allows the developer to describe why the app wants to access the user's reminders.
Privacy - Siri Usage Description (NSSiriUsageDescription) - Allows the developer to describe why the app wants to send user data to Siri.
Privacy - Speech Recognition Usage Description (NSSpeechRecognitionUsageDescription) - Allows the developer to describe why the app wants to send user data to Apple's speech recognition servers.
Privacy - TV Provider Usage Description (NSVideoSubscriberAccountUsageDescription) - Allows the developer to describe why the app wants to access the user's TV provider account.
반응형