When i swipe up my app, to kill my background service on ios, the onDestroyed is called, but, async methods not be executed
this is the simple snippet to reproduced.
Only synchronous methods will be executed, but I need asynchronous methods to be executed as well.
@override
Future<void> onDestroy(DateTime timestamp, bool isTimeout) async {
print("[$_LOG] onDestroy: START - timestamp=$timestamp, isTimeout=$isTimeout");
await Future.delayed(Duration(seconds: 1));
print("[$_LOG] onDestroy: after delay 1");
await Future.delayed(Duration(seconds: 1));
print("[$_LOG] onDestroy: after delay 2");
await Future.delayed(Duration(seconds: 1));
print("[$_LOG] onDestroy: after delay 3");
await Future.delayed(Duration(seconds: 1));
print("[$_LOG] onDestroy: after delay 4");
await Future.delayed(Duration(seconds: 1));
print("[$_LOG] onDestroy: after delay 5");
await Future.delayed(Duration(seconds: 1));
print("[$_LOG] onDestroy: after delay 6");
await Future.delayed(Duration(seconds: 1));
print("[$_LOG] onDestroy: after delay 7");
await Future.delayed(Duration(seconds: 1));
print("[$_LOG] onDestroy: after delay 8");
}
Log when app is killed

When i swipe up my app, to kill my background service on ios, the onDestroyed is called, but, async methods not be executed
this is the simple snippet to reproduced.
Only synchronous methods will be executed, but I need asynchronous methods to be executed as well.
Log when app is killed