Local Notification specifics

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;

You are not setting the date correctly. You need to specify a full date. Not just SUN, 03:00. You need to also include the year. Then I also do not see where you init the notification or where you set it into the system

Hi Nightstalker-DNS,

(Nice Avatar, that was a good game!) No it was just part of the code; the bit I thought was wrong and relevant…it was indeed that bit that was wrong, thank you for helping!! I’d changed it so many times think I’d just dug myself into a chasm, instead of just a mine.

Full date has helped thanks for hint, thought in both cases not all needed to be specified - will remember for future use - also now converted to setting via a component based which runs without issue.

Thanks again!!