nickoneill / PermissionScope

Intelligent iOS permissions UI and unified API
MIT License
4.85k stars 507 forks source link

Defines a callback for the notifications permission #207

Open dominikweifieg opened 7 years ago

dominikweifieg commented 7 years ago

When using frameworks like PushWoosh or OneSignal, the app has to call methods on these frameworks to request the permission for notifications from iOS. Since PermissionScope calls UIApplication.shared.registerUserNotificationSettings itself, it is not possible to use PermissionScope and, e.g., OneSignal together in an integrated way. I have added a notificationRequestCallback which, if set, will be called instead of UIApplication.shared.registerUserNotificationSettings in requestNotifications

nickoneill commented 7 years ago

Thanks @dominikweifieg, this sounds reasonable. Can you add this to the docs as well?

dominikweifieg commented 7 years ago

Sure, will do so tomorrow morning my time and add it to the pull request. Thanks!