MyLocations missing info.plist entry for camera usage(v5.0)

I am going through the MyLocations tutorial and am at the part where we are adding the ability to add a photo from the Library or take a photo with the camera. The book mentions the requirement of adding the following to the info.plist file - ‘Privacy - Photo Library Usage Description’. When I loaded the app onto my iPhone and tried to add a photo by taking a photo, the app crashed with the following 'This app has crashed because it attempted 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

I did not see the book mention the need to add this when we added the ability to take a photo with the camera. Even though this is the most straight forward/human readable error message i’ve ever seen in xCode I thought I’d add it here in case someone else runs into this. It took me a couple of runs to think to look at the error/crash output…which was only after I triple checked I hadn’t typed some code incorrectly.

1 Like

Oooohhh… I missed that one. Good catch! I’ll add it to the book since the app won’t work very well without it. Thanks for pointing this out! :smiley:

1 Like

Yeah this seems to be really new. Existing apps don’t appear to need it but new stuff submitted to the app store is apparently requiring it.