views:

41

answers:

1

I'm receiving two alerts for the notification below, and I cannot for the life of me figure out why. The code only appears to be called once, but App: didReceiveLocalNotification is being called twice. And I can't figure out why!

    NSLog(@"Configuring notifications time is up.");
    noTimeLeft=[[UILocalNotification alloc]init];
    noTimeLeft.fireDate=meterEndTime;
    noTimeLeft.alertBody=@"Your parking meter has expired!";
    noTimeLeft.alertAction=@"Go to meter";
    noTimeLeft.userInfo=[NSDictionary dictionaryWithObject:self.meterEndTime forKey:@"NSDate"];
    [[UIApplication sharedApplication] scheduleLocalNotification:noTimeLeft];
    NSLog(@"Configuring notifications finished time is up.");
A: 

http://stackoverflow.com/questions/3227080/local-notification-didreceivelocalnotification-calls-twice/3375197#3375197

Turns out it's a bug in the simulator.

How did I MISS that question when I was searching though, lol.

RonLugge