You can use UILocalNotification:
UILocalNotification *local = [[UILocalNotification alloc] init]; // create date/time information local.fireDate = [NSDate dateWithTimeIntervalSinceNow:20*60]; //time in seconds local.timeZone = [NSTimeZone defaultTimeZone]; // set notification details local.alertBody = @"Alarm!"; local.alertAction = @"Okay!"; local.soundName = [NSString stringWithFormat:@"Default.caf"]; // Gather any custom data you need to save with the notification NSDictionary *customInfo = [NSDictionary dictionaryWithObject:@"ABCD1234" forKey:@"yourKey"]; local.userInfo = customInfo; // Schedule it! [[UIApplication sharedApplication] scheduleLocalNotification:local]; [local release];
source share