3

Im using a notification content extensions with customized action (Accept, Dismiss). When pressing dismiss I'm trying to send an https request to my server. Keep getting -1009 error (The Internet connection appears to be offline).

Application is setup to use background modes.

Is it even possible to run any network calls in the background?

mfaani
  • 33,269
  • 19
  • 164
  • 293
TalMihr
  • 1,528
  • 1
  • 15
  • 31
  • https://developer.apple.com/documentation/uikit/core_app/managing_your_app_s_life_cycle/preparing_your_app_to_run_in_the_background/https://developer.apple.com/documentation/uikit/core_app/managing_your_app_s_life_cycle/preparing_your_app_to_run_in_the_background/extending_your_app_s_background_execution_timeextending_your_app_s_background_execution_time – Nordeast Aug 15 '18 at 13:52

1 Answers1

2

My bad. The problem was calling the completionHandler without waiting for my rest response.

TalMihr
  • 1,528
  • 1
  • 15
  • 31