hi,
I would add to the local notification to my app that iOS 5
displays a simple text to be displayed by the hour
targets (6AM, 12AM, 6PM, 12PM)
I created this code but no good, because it at intervals and not
predetermined hours, can anyone help?
Code:
- (void)applicationDidEnterBackground:(UIApplication *)application{
NSDate *alertTime = [[NSDate date] dateByAddingTimeInterval:10];
UIApplication* app = [UIApplication sharedApplication];
UILocalNotification* notifyAlarm = [[UILocalNotification alloc] init];
if (notifyAlarm) {
notifyAlarm.fireDate = alertTime;
notifyAlarm.timeZone = [NSTimeZone defaultTimeZone];
notifyAlarm.repeatInterval = (360*60);
notifyAlarm.soundName = @"suono tasto8.caf";
notifyAlarm.alertBody = @"Hello universe!";
notifyAlarm.applicationIconBadgeNumber = NO;
[app scheduleLocalNotification:notifyAlarm];
}
}