In the iOS client when you first run it you get a UIAlert asking for permission to grant access to send this person notifications.
I'm wondering if its possible to first:
- Catch when this alert will fire (before it happens)
- Catch what response is given (cancel or ok) (after it happens)
Is there such a way to get callbacks for the above two scenarios?
Many thanks
On iOS 8 and later, implement the following method in your AppDelegate:
This method is a
UIApplicationDelegate
method, so all you need to do is implement it in yourMyAppDelegate.m
file.From the documentation:
The application itself is causing the alert to pop, so you don't need to "catch" anything.
Once you call
- (void)registerForRemoteNotifications
, the OS will fire the alert.Read here for more details.