There is an alarm clock. I can not make a notification when the alarm goes off. You need to make a push notification with sound, the user must turn it off. Now I just made a notification notification.
Is it possible to do something using notification what I wrote above?
UILocalNotification * notification = [[UILocalNotification alloc] init]; notification.userInfo = dict; notification.timeZone = [NSTimeZone defaultTimeZone]; notification.fireDate = self.eventDate; notification.alertBody = _luck; notification.applicationIconBadgeNumber = 1; notification.soundName = UILocalNotificationDefaultSoundName; notification.repeatInterval = 0; [[UIApplication sharedApplication]scheduleLocalNotification:notification]; [[NSNotificationCenter defaultCenter] postNotificationName:@"NewEvent" object:nil]; [self.navigationController popViewControllerAnimated:YES];
setAction, which will cancel all this cacophony (then a button will appear on the screen). Turn off the sound on the device will not work. - Max Mikheyenko