Note that there are some explanatory texts on larger screens.

plurals
  1. POTwo Local notifications Not Firing
    primarykey
    data
    text
    <p>I'm implementing local notification in my app. In a screen, i placed two textfield, with time. For example,the first textfield having 2.44 pm and 2nd textfield having 2.45pm . The first textfield 's time local notification is not firing on 2.44 pm. but 2.45pm notification is firing correctly. And, 2.44pm notification displaying with 2.45 pm. </p> <pre><code>// viewcontroller.m file Class cls = NSClassFromString(@"UILocalNotification"); if (cls != nil) { [[UIApplication sharedApplication] cancelAllLocalNotifications]; UILocalNotification *notif = [[cls alloc] init]; notif.fireDate = [datePicker date]; notif.timeZone = [NSTimeZone defaultTimeZone]; { if ([MorningTimelbl.text length]&gt;0) { notif.fireDate = [datePicker date]; notif.timeZone = [NSTimeZone defaultTimeZone]; notif.alertBody = @"It's time to take your eye drops"; notif.alertAction = @"Morning Notification"; notif.soundName = UILocalNotificationDefaultSoundName; notif.applicationIconBadgeNumber = 1; notif.repeatInterval = NSDayCalendarUnit; NSDictionary *mornDict = [NSDictionary dictionaryWithObject:MorningTimelbl.text forKey:kRemindMeNotificationDataKey]; notif.userInfo = mornDict; [[UIApplication sharedApplication] scheduleLocalNotification:notif]; } if ([LunchTimelbl.text length]&gt;0) { notif.fireDate = [datePicker date]; notif.timeZone = [NSTimeZone defaultTimeZone]; notif.alertBody = @"It's time to take your eye drops"; notif.alertAction = @"Lunch Notification"; notif.soundName = UILocalNotificationDefaultSoundName; notif.applicationIconBadgeNumber = 1; notif.repeatInterval = NSDayCalendarUnit; NSDictionary *lunchDict = [NSDictionary dictionaryWithObject:LunchTimelbl.text forKey:kRemindMeNotificationDataKey]; notif.userInfo = lunchDict; [[UIApplication sharedApplication] scheduleLocalNotification:notif]; } } //appdelegate.m - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { UIApplicationState state = [application applicationState]; if (state == UIApplicationStateActive) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Reminder" message:notification.alertBody delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; } // Set icon badge number to zero application.applicationIconBadgeNumber = 0; } </code></pre> <p>where i did mistake? Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload