Next Fire Date at UIlocalNotification

Hi everyone, I created UILocalNotification .... & when I print it

NSLog(@"Notification %@",self.notification) 

He gives

 Notification <UIConcreteLocalNotification: 0x6f45440> {fire date = 2010-10-22 00:09:00 -0700, time zone = America/Vancouver (PDT) offset -25200 (Daylight), repeat interval = 64, **next fire date** = 2010-10-22 00:10:00 -0700} 

But I want to access the next fire date of this Notice, how can I get this value?
Please help us with this.

+1
source share
4 answers

UILocalNotification has a fireDate property that you can use.

+1
source

You cannot access it directly as a property, because it is calculated based on fireDate and repeatInterval.

Here is the answer to your question

How to get the next date by fire from a UILocalNotification object

+1
source

Just use:

 NSCalendar *calendar = [NSCalendar currentCalendar]; NSDateComponents *comps = [calendar components:self.localNotification.repeatInterval fromDate:self.localNotification.fireDate]; NSDate *nextFireDate = [calendar dateFromComponents:comps]; 
-1
source

you can access the next date from the description of [self.notification], which is nsstring, and remove unnecessary characters from the returned string

-3
source

All Articles