iOS Notifications: callbacks not called
<p>I'm implenting a reminder feature for an app through local notifications.
The user will setup times and repetition intervals and the app will schedule the respective notifications like this:</p>

<pre><code>UILocalNotification *notification = ...;
[[UIApplication sharedApplication] scheduleLocalNotification:notification];
</code></pre>

<p>For this to work I need to register my notification types like this:</p>

<pre><code>UIUserNotificationSettings *notificationSettings;

notificationSettings = [UIUserNotificationSettings
                         settingsForTypes:UIUserNotificationTypeAlert
                               categories:nil];

[[UIApplication sharedApplication]
  registerUserNotificationSettings:notificationSettings];
</code></pre>

<p>Although the notifications are be scheduled correctly none of the AppDelegate callbacks (<code>didRegisterUserNotificationSettings</code>, <code>didReceiveLocalNotification</code>) are called. But I need to react to
notifications when the app is in the foreground.</p>

<p>Registering notification settings should trigger a callback message in the AppDelegate:</p>

<pre><code>- (void)application:(UIApplication *)application
        didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
{
   NSLog(@"Callback called.");
}
</code></pre>

<p>It works just fine for a quick test project (New Project -> Single View App -> add register code and callback -> launch). The callback gets called.</p>

<p>However, in the real app it does not work. </p>

<p>I completly stripped my apps AppDelegate (removed custom init code, no ui loading) so that it just registers the notification settings. A fresh app install triggers the user confirmation dialog correctly. But the callbacks won't get called.</p>

<p>Am I missing a build setting/compiler flag? I'm not aware of any special settings for the app pointing in that direction. I can't spot any difference to the example project.</p>

<p>Xcode 7.2 , iPod5 iOS9.2.1</p>