Application can't load photos from Photo Library on iOS simulator

1.8k Views Asked by At

I am facing problem in loading photos on simulator but it is working on devices. Even it is working on other mac. I have added the NSPhotoLibraryUsageDescription key into the plist file. But the permission message is not loading while I am going to access the photo library.

Instead I am getting the following scenario on simulator:

enter image description here

I have also checked the settings on simulator and my app is not showing on Photos privacy:

enter image description here

2

There are 2 best solutions below

1
Matloob Hasnain On

You need to add permission Please read this link to load photos in iOS 10

https://iosdevcenters.blogspot.com/2016/09/infoplist-privacy-settings-in-ios-10.html

7
Sarabjit Singh On

You need to give permission to your app to access photos. For this you need to do following steps:

  1. Open settings in your simulator
  2. Look for your App name and then tap on it.
  3. Then turn on the switch to access photo's.