Category: iOS Development
Building your iPhone App for iOS10 on XCode8 – NSPhotoLibraryUsageDescription
If you successfully build, archive and upload your iOS app using XCode8 against the iOS10 SDK, after you your application, you may see it in your iTunes Connect account for just a moment while it is processing, but then it disappears inexplicably.
Check your email from itunesconnect@apple.com, there are some additional requirements to your iOS10 app that were not built into the XCode warning and requirements.
In one case we had a UIIMagePickerController so when we uploaded our application to iTunesConnect through the Organizer window in XCode8, it appeared that iTunes COnnect accepted it with an “Upload Successful”. I s immediately able to see that the application was “Processing” under the “Activity -> All Builds” tab of iTunesConnect.
However, then it disappeared and I received a message from itunesconnect@apple.com which a couple of messages in it. One message was a warning prefaced by “Though you are not required to fix the following issues, we wanted to make you aware of them:” That is a topic for another post, however the important message was:
- 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.
I opened my projects plist.info and added the following “<key>NSPhotoLibraryUsageDescription</key><string>This application requires access to users Photo Library if the user would like to set a profile image</string>”
When opening the plist.info page as a Property List in xcode, I was able to see that the Full Name of the key was “Privacy – Photo Library Usage Description”.
Once I had corrected the issue again, I built, archived and uploaded again and the build completed within iTunesConnect.