Local notification does not appear after second close of app

I need so show local notification right after user closes app (swipe up).

For that purpose I have such code:

- (void)applicationWillTerminate:(UIApplication *)application {

    [self showNotificationAboutClosingApp];
}

and

- (void) showNotificationAboutClosingApp {

    UNMutableNotificationContent *content = [[UNMutableNotificationContent alloc] init];
    content.title = @"test title";
    content.body = @"test body";
    content.sound = UNNotificationSound.defaultSound;

    NSString *requestIdentifier = [[NSUUID UUID] UUIDString];
    NSDate *fireDate = [NSDate dateWithTimeIntervalSinceNow:10.0];
    NSDateComponents *components = [[NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian] components:kCFCalendarUnitSecond fromDate:fireDate];
    UNCalendarNotificationTrigger *trigger = [UNCalendarNotificationTrigger triggerWithDateMatchingComponents:components repeats:false];
    UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:requestIdentifier content:content trigger:trigger];

    [[UNUserNotificationCenter currentNotificationCenter] addNotificationRequest:request withCompletionHandler:nil];
}

There is strange behavior: First time I launch app, close it (swipe up) -> notification appears in 10 seconds. But after I reopen app and do the same, I mean close app through swipe up, there is no notification after 10 seconds. What I found - if I delete app from iPhone, turn off and turn on iPhone again, install app, close app through swipe up - notification appears.

Any ideas what is wrong in my approach?