0

I am using Local Notifications with UNNotificationAction, when the user triggers the action I need to send an API request to the server.

When the device is on Low power mode and Background App Refresh is turned off and the app is killed, I get a weird behaviour on the action handler.

After the user taps the selected action on the notification - App Delegate didFinishLaunchingWithOptions() start to process but never finish.

It seems like the process is suspended in the middle of this function.

This behaviour also stops the handler function of the Notification Action.

After monitoring with logs (debugging from Xcode it always works), I see the state of the application is background on startup.

Also, I could not see any logs that indicate crush or process suspension

I could not find any documentation of handling such a case.

rmaddy
  • 314,917
  • 42
  • 532
  • 579

1 Answers1

0

This is quite a long shot, and I don't know if it will solve your issue, but remember that there are limitations regarding what can you do inside the didFinishLaunchingWithOptions method. IIRC, if that method takes more than 10 seconds to execute, the application gets killed (the system thinks something went reeeally ballistic). So, if you need to trigger something heavy through that method, make sure you run it asynchronously.

Bartserk
  • 675
  • 6
  • 18