Closed imclean closed 4 years ago
Ok, in case anyone tries using the code in the README, it's wrong:
Delegate methods should be:
func permissionSet( permissionSet: PermissionSet, didRequestPermission permission: Permission) {} func permissionSet( permissionSet: PermissionSet, willRequestPermission permission: Permission) {}
I have created a Permissions Manager, this manager returns permission buttons when requested. The manager is also the PermissionSet delegate. When the permission is requested and the delegate inside PermissionSet is called (I can breakpoint it), it never passes it to the manager and after it is called the first time it seems to be called multiple times with no delegate.
Here is the Manager, try yourself.
` import Foundation import Permission
class PermissionManager {
}
extension PermissionManager: PermissionSetDelegate { func permissionSet(permissionSet: PermissionSet, willRequestPermission permission: Permission) { print("Will request (permission)")
} `