iOS 10 error [access] when using UIImagePickerController

后端 未结 5 915
野趣味
野趣味 2020-11-28 20:03

I am using XCode 8 and testing with iOS 10.2 Beta.

I have added the Photos, PhotosUI and MobileCoreServices frameworks to project.

Very simple code:

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-28 20:23

    In iOS 10, Apple has changed how you can access any user private data types.

    You need to add the Privacy - Photo Library Usage Description key to your app’s Info.plist and their usage information.

    For more information please find the below GIF.

    Or if you want to add via info.plist then you need to add NSPhotoLibraryUsageDescription key.

    Just copy and paste below string in info.plist.

    NSPhotoLibraryUsageDescription
    Take the photo
    

    Please find the below GIF for more information.

提交回复
热议问题