Kaspa
Kaspa

Reputation: 2209

UILocalNotification iOS5 issue (no alert shown)

Is it only me or did Apple break the UILocalNotification mechanism in iOS5 (GM + public release)? It seemed to work fine in the betas but since GM only the sound plays back, no alert is shown (yes I have checked the Notification Settings and the app is all on ON).

I've also made a small separate project (with a brand new app identifier just to be on the safe side), and tested the UILocalNotification class with some very simple code, on the order of:

UILocalNotification *singleLocalPush = [[UILocalNotification alloc] init];

singleLocalPush.fireDate = [NSDate dateWithTimeIntervalSinceNow:15];
singleLocalPush.hasAction = YES;
singleLocalPush.alertBody = @"Alert Body";
singleLocalPush.alertAction = @"Alert Action";

[[UIApplication sharedApplication] scheduleLocalNotification:singleLocalPush];

anyone experience similar problems? This is pretty annoying if your app IS about local notifications :)

Best, Kacper

Upvotes: 5

Views: 1873

Answers (1)

Alon Amir
Alon Amir

Reputation: 5035

You should make sure your app is enabled for notifications-

Navigate to Setting->Notifications and make sure your app is enabled.

My app's local notifications work fine on iOS 5, and it was set to be deployed to 3.1.2.

Upvotes: 1

Related Questions