Keeping application in background after wake it up by Geofence event. How?

Hello all!

My application required to be launched when Geofence event appeared. For now all is working - application launched by Geofence event, but only for 10-15 seconds. Is there any way to keep it working much longer?

Is there any necessity to implement Background task object? For now in AppDelegate not defined background task, just actions that need for application functionality.

There exists an API that you can use to request the system to extend your background time up to 30 seconds: https://developer.apple.com/documentation/uikit/uiapplication/1623031-beginbackgroundtaskwithexpiratio

It is not possible to extend background activity beyond this for apps which have been suspended in the background and woken up by region monitoring events.

Keeping application in background after wake it up by Geofence event. How?
 
 
Q