Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 746
Kaspa Avatar asked Nov 13 '22 15:11

Kaspa


1 Answers

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.

like image 120
Alon Amir Avatar answered Jan 14 '23 18:01

Alon Amir