Hi,
I’m despite reading a heap of things in books and online I’m having a bit of trouble. Im trying to program in a specific day (Sun/ Mon) and time for a local notification. The code I’m using is ‘successful’ but doesn’t actually fire-off. I’m hoping someone can see where I’ve gone wrong? tried full date and time yyyy-mm-dd hh:mm:ss and some other variations but still same result. Anybody know where I’ve gone wrong? (Sorry I’m still new to all this so apologise if error may seem basic.) Thanks for your help!
//part of the code I’ve added in to try to specify a specific time/ day
//Set initial string for conversion to date format
NSString *thatdate = @“SUN, 03:00”;
//Set about converting to get same data type for firing from NSDateFormatter *tempFormatter = [[[NSDateFormatter alloc]init]autorelease]; [tempFormatter setDateFormat:@“EEE, hh:mm”]; NSDate *mydate = [tempFormatter dateFromString:thatdate];
//Apply new date to activate from local.fireDate = mydate;
local.timeZone = [NSTimeZone defaultTimeZone]; local.alertBody = @“Come back to the app”; local.alertAction = @“Okay”; local.applicationIconBadgeNumber = 1;