애플서버에서 권한허용 문제로 빌드 실패하는 경우

Xcode 8로 업데이트후 애플 서버에 빌드를 제출하면 잠시후 아래와 같은 메시지로 실패했다고 메일이 오는 경우가 있다. 애플 빌드서버에서 실패하는거라 실제로는 Xcode 8 이 아니라 iOS 10을 지원하는 경우 발생한다고 보는게 맞겠다.

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSAppleMusicUsageDescription key with a string value explaining to the user how the app uses this data.

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSContactsUsageDescription key with a string value explaining to the user how the app uses this data.

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app uses this data.

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSBluetoothPeripheralUsageDescription key with a string value explaining to the user how the app uses this data.

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data.

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSMotionUsageDescription key with a string value explaining to the user how the app uses this data.

이는 카메라나 달력등 개인정보 관련된 권한을 사용할때만 Info.plist에 설정하면 되는 코드인데 사용하지 않는데도 애플 빌드서버에서 이런 오류를 발생하는 경우가 있다.

확인해보니 애플서버에서는 빌드할때 개인정보 관련코드가 외부 라이브러리에 있더라도 이걸 체크해서 무조건 위와 같이 오류를 발생한다.

나는 PermissionScope 라는 라이브러리를 사용하는데 이거는 앱 사용자에게 현재 권한을 보여주고 쉽게 권한을 요청하기에 좋은데 라이브러리 특성상 모든 개인정보 권한 코드를 가지고 있다. 라이브러리 사용할때 특정 개인정보는 사용하지 않으면 사용자가 볼일이 없는데도 라이브러리에 코드가 있다는 이유로 애플 빌드서버에서는 이런 오류를 발생시킨다.

이 문제를 고치려면 이와 같은 라이브러리를 사용하지 않거나 위에 언급된 키들에 대해 모두 문자열을 추가하면된다. 그런데 라이브러리에서 내부적으로 사용하지 않는 코드가 들어있을수도 있는데 이걸 다 어떻게 체크하나 ㅜㅜ 애드몹 같은 경우도 달력이나 몇개의 개인정보에 접근하는 코드가 있는데 이건 개발자가 적용할때 안쓴다고 하면 안쓰는건데…. 그래서 그냥 속편하게 모든 키를 다 추가하면 된다. 어차피 사용자가 안볼 문구이니까

게시글의 아마존, iTunes 링크들을 통해 구매를 하시면 제휴(Affiliate) 프로그램에 의해 저에게 일정 금액이 적립될 수 있습니다. ^_____^

Subscribe to Seapy Blog

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
[email protected]
Subscribe