iOS Apprentice "My Location" Ch. 30

I have a problem with getting the “permission access” for the user’s photo library to pop up when the user first opens the photo picker. I’ve added “Privacy-Photo Library Usage Description” and “Privacy-Camera Usage Description” to Info.plist. The book states that you don’t have to write any code for this.

I have deleted the app, quit Xcode, and started back up.

PLSE HELP!!!

Does the photo picker actually pop up when you try to access it? Or does the app crash?

And do you see anything in the Xcode console when you try to access the photo picker? If yes, can you please post what you see in the console?

The photo picker does pop up and this is what I get in Xcode console when I tap on the photo picker:

2018-10-23 00:18:51.620620-0400 MyLocations[13963:1177877] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/justnerd/Library/Developer/CoreSimulator/Devices/30FDFBEF-CFD6-4192-97CD-BB96562F3409/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles

2018-10-23 00:18:51.621790-0400 MyLocations[13963:1177877] [MC] Reading from private effective user settings.

If the photo picker pops up, then you are fine. I believe the requirement for permission for the photo picker changed from one iOS version to the other - I forget which one exactly but you probably do not get prompted for the permission for the photo picker any longer.

1 Like

Ok Thank you so much for you response!!!

IOS 11 or 11.2 is when it changed to no longer needing user permission.

1 Like

Thank you for your response!!

@justnerd @sgerrard is correct. This restriction existed in iOS 10, and you really needed to include “Privacy-Photo Library Usage Description” as a key, with a String value of something like “We need access to your photo library please”. This should have sufficed if you implemented the delegate methods correctly for UIImagePickerControllerDelegate, and UINavigationControllerDelegate.

This topic was automatically closed after 166 days. New replies are no longer allowed.