sparrowcode / PermissionsKit

Universal API for request permission and get its statuses.
https://x.com/sparrowcode_ios
MIT License
5.64k stars 462 forks source link

Photo Library Not import issue #171

Closed victormihaita closed 4 years ago

victormihaita commented 4 years ago

I get this error when I check if photo library access is authorised:

Thread 1: Fatal error: SPPermissions - Photo Library not import. Probelm NOT with usage description key. I recomend to see installation guide: https://youtu.be/1kR5HGVhJfk. More details in Readme: https://github.com/ivanvorobei/SPPermissions

I have this in the pod file:

pod 'SPPermissions/Camera'
pod 'SPPermissions/PhotoLibrary'

This is the code that is crashing:

let permissions: [SPPermission] = [.camera, .photoLibrary].filter { !$0.isAuthorized }
if permissions.isEmpty {
     //do something
}

If I use only the camera, it works @ivanvorobei Any suggestions?

victormihaita commented 4 years ago

I found the solution. I had to completely remove the pods, build without them, and them add them back. This seems to work. We don't actually need to use at all the pod 'SPPermissions', so maybe explain it better in the documentation.

ivanvorobei commented 4 years ago

If you add pod 'SPPermissions' it nothing change. It simple bug installation. I hope all ok for now.

victormihaita commented 4 years ago

Everything works now. Is it possible to present the the alert without that shaking animation and remove the gesture to dismiss it? I would like to just disable all those fancy animations. is there a simple way to achieve that? And great work!!!

ivanvorobei commented 4 years ago

@victormihaita for now no way do it.

victormihaita commented 4 years ago

Is this something that you may implement in the near future?

ivanvorobei commented 4 years ago

@victormihaita see problem, Apple not allow disable close alert for permissions. I can add remove animation, but gester really need for approve form Apple.

victormihaita commented 4 years ago

Okay. Then please just add the functionality to remove that animation to rotate the alert 🚨:) that would be really appreciated.

ivanvorobei commented 4 years ago

Please, create new issue for it. I will close when add it.

ahmedsafadii commented 4 years ago

SPPermissions - Photo Library not import

have this issue also

ivanvorobei commented 4 years ago

@ahmedsafadii please, attach your podfile