I have requirement to initiate sync on every night at 1 AM or every 2 weeks. How will I achieve this in iOS? Is there a way in iOS that my application can say remind me at t
You can use NSLocalNotification. See an example (taken from here):
UILocalNotification *notification = [[UILocalNotification alloc] init];
// Activate in 5 segundos
notification.fireDate = [[NSDate alloc] initWithTimeIntervalSinceNow:5];
// message to show
notification.alertBody = self.nameTextField.text;
// default sound
notification.soundName = UILocalNotificationDefaultSoundName;
// button title
notification.alertAction = @"Ahora te lo cuento";
notification.hasAction = YES;
// activa la notificación
[[UIApplication sharedApplication] scheduleLocalNotification:notification];
The point is that the behaviour depends on the application state when the local notification fires. If the app is running on the foreground, you can handle the notification silently. But if the app is not running, or it's in the background, user interaction is required.