Hi i i have a local push notification problem. I implemented in-app language change function in my app. and i have to restart the app after changed for reflect changes all part of my app. so i use abort() method. before abort app i scheduled notification like this
UNMutableNotificationContent* content = [[UNMutableNotificationContent alloc] init];
content.title = [NSString localizedUserNotificationStringForKey:@"Hello!" arguments:nil];
content.body = [NSString localizedUserNotificationStringForKey:@"Languaged changed. Touch to restart." arguments:nil];
content.sound = [UNNotificationSound defaultSound];
// Deliver the notification in five seconds.
UNTimeIntervalNotificationTrigger* trigger = [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:3 repeats:NO];
UNNotificationRequest* request = [UNNotificationRequest requestWithIdentifier:@"FiveSecond" content:content trigger:trigger];
// Schedule the notification.
UNUserNotificationCenter* center = [UNUserNotificationCenter currentNotificationCenter];
[center addNotificationRequest:request withCompletionHandler:nil];
abort();
i want to user come back to app by touching alert but push message didn't come at all the time. sometimes it was came and doesn't work again. please help me if you know something about this issue.