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

Great Job on the new changes!!! I have a couple questions. #143

Closed sdevo619 closed 4 years ago

sdevo619 commented 4 years ago

Do you have an example of how the new func data(for permission: SPPermission) -> SPPermissionData? is supposed to be setup, as it it won't let me create a SPPermissionData object.

image

I was using the old functions to do this before: func image(for permission: SPPermission) -> UIImage? { func description(for permission: SPPermission) -> String? {

I am trying to see what I need to do to support custom icons and descriptions again, with the newest changes you just made. Keep up the great work and thank you again for keep this up to date and working great!!!

ivanvorobei commented 4 years ago

Good day! You do correct. It my mistake, sorry.

I am upload new version 5.0.4 with fix it. If you install via Cocoapods, now need some delay for refresh repo (Cocoapods start use CDN with cache).

sdevo619 commented 4 years ago

Thank your for fixing that so quickly!!!! The newest build fixed that issue for me. I found another bug in the process though. Every time I relaunch the app in the simulator the permission order changes. One launch the order is Media Library, Notification, then Location. Then terminate the app, and relaunch, and the order will be different the next launch. It will be Media Library, Location, then Notification. Probably just need to set the order on the array you use to hold them. Thank you again!!! Keep up the great work!!!!

ivanvorobei commented 4 years ago

@sdevo619 thanks, true, order shuffle. I fix it now, no problem) Thanks for feedback