I want to set local Notification notify the message on every week when application is installed and notification message will be randomisation.
// Notification Random Message Array
messgeArray = [NSMutableArray arrayWithObjects:@"Welcome",@"Hello",@"How about you",@"Good Day",nil];
// Notification for Every Week
NSDate *date = [NSDate date];
NSDate *oneDaynotification = [date dateByAddingTimeInterval:60*60*24*7];
UILocalNotification* localNotification = [[UILocalNotification alloc] init];
srand((unsigned)time(NULL));
localNotification.fireDate = oneDaynotification;
randomMessage = [messgeArray objectAtIndex:arc4random() % [notificationArray count]];
localNotification.alertBody = randomMessage;
localNotification.soundName = UILocalNotificationDefaultSoundName;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
After i change my system time i do not see any notification message, Can any one advice me how to implement a Notification trigger every week with random notification message with it.