When I access my Photo Library with an UIImagePicker to choose a photo, the app shows me sometimes a black screen and sometimes a screen that says that I have to give permis
it is very simple,
just go in
simulator -> hardware -> Home
then in phone's settings -> in your app -> now allow by move switch option like below image