0

I am trying to have my app execute functions in the background on a regular basis. As performFetchWithCompletionHandler is too unpredictable I read about APNs.

Can I use APNs to periodically send a silent push notification to the device that would make the app execute my data fetching and analyzing functions then displaying a notification to the user accordingly?

Is it possible to have the server send the "wakeup signal" only and have the app display the notification by itself because of this?

I might have misunderstood the APNs logic entirely.

Wizzardzz
  • 781
  • 1
  • 9
  • 32
  • Sounds sneaky, so Apple probably wouldn't like it. – John Franke Jan 04 '18 at 15:57
  • Maybe this question and answers may help: https://stackoverflow.com/a/19202487/4597019 – jackchmbrln Jan 04 '18 at 16:02
  • Thanks Jack but my app is not a VoIP so it might get rejected if i use PushKit but it seemed to be a great solution. I'm amazed at how hard it is to only have my app refreshed on a regular basis in the background. Could I use the API I'm fetching the data from to trigger the refreshing process when it's data is updated through APNs? I thought `content-available` was my solution. – Wizzardzz Jan 04 '18 at 16:12

0 Answers0