1

I’m using Xcode 11.3.1 (11C504) and iOS 13

I am using camera to upload photos on my app, app crashes with following very known message:

This app has crashed because it attempted 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.

Added the NSCameraUsageDescription in my info.plist, but I still get the crash no matter what. Cleaned the app, deleted the app, even restarted Xcode, still crashed with same message every time.

Did this happen to anyone? Did anyone made it work? Am I missing anything?

<key>NSPhotoLibraryUsageDescription</key>
<string>This application saves Photos and videos to your library.</string>
Ravindra_Bhati
  • 803
  • 7
  • 23

1 Answers1

0

If you want to write, save photos into your photos library then you have to add below key in info.plist

Obviously, to solve this crash you have to add the

NSPhotoLibraryAddUsageDescription into the application's plist file:

<key>NSPhotoLibraryAddUsageDescription</key>
<string>Our application needs permission to write photos...</string>

Below are the things you can try.

1- Can you check whether your info.plist is correctly attached with target

2- Secondly are you sure, mistakenly you are not adding on Test target info.plist.

3- Last option would be to build clean your project, delete drive data and restart Xcode.

Hope it will help.

Muhammad Waqas Bhati
  • 2,549
  • 17
  • 23
  • i added but issue still same. – Ravindra_Bhati Apr 01 '20 at 13:31
  • 1
    can you check whether your info.plist is correctly attached with target secondly are you sure, mistakenly you are not adding on Test target info.plist. Last option would be to build clean your project, delete drive data and restart Xcode. – Muhammad Waqas Bhati Apr 01 '20 at 13:42
  • @Ravindra_Bhati great you resolved it .... what was the issue ? – Muhammad Waqas Bhati Apr 02 '20 at 07:05
  • 1
    info.plist with embedded Target so there i was wrong, i'm adding a permission in the info.plist of Notification extension that's why i'm getting a problem. so i remove a all permission which required i add in project info.plist. anyway thanks to give me a support. – Ravindra_Bhati Apr 02 '20 at 08:53