View Full Version : UILocalNotification fireDate

Jul 15, 2010, 06:51 PM
I am having trouble scheduling a local notification, I have all of the code accept the fireDate code: UILocalNotification *Notification = [[UILocalNotification alloc] init];
Notification.alertBody=[NSString stringWithFormat:@"Local Notification Test"];
Notification.alertAction = @"Yes";
Notification.soundName = UILocalNotificationDefaultSoundName;
Notification.timeZone = [NSTimeZone defaultTimeZone];
Notification.fireDate =
[[UIApplication sharedApplication] scheduleLocalNotification:note];
[Notification release];

I cannot figure out how to schedule the fireDate, I have been looking over the example codes but cannot seem to get it. Could someone show me how to set the fireDate?


Jul 16, 2010, 03:49 AM
Create an NSDate (http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSDate). Really does not seem that hard. If you have a detailed, specific issue then perhaps more help can be given.