I am trying to schedule a UILocalNotification
one minute after the application is launched. This is the code i use,
-(void)scheduleNotification{
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
localNotif.timeZone = [NSTimeZone defaultTimeZone];
localNotif.fireDate = [NSDate dateWithTimeIntervalSinceNow:60];
localNotif.alertBody = @"Test";
localNotif.alertAction = @"View";
localNotif.soundName=UILocalNotificationDefaultSoundName;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
[localNotif release];
}
The alertView is showed after the appropriate time, but sound is not being played. Am i missing something ?
Thanks in advance
Edit I am testing it on the simulator now