BGTaskScheduler.shared.register() does not get called

Hi all. Any clue why

BGTaskScheduler.shared.register() does not get called? The print does not show anything to console.

I already registered them in Permitted Background task scheduler identifiers and added 2 items for

package.Task.updateAppRefresh package.Task.updateAppProcessing

I re-read the tutorial and I cannot figure out what else i am lacking? Thoughts?

  • Note: I am using this in SwiftUI

Add a Comment

Replies

Well, no matter what I do, it looks like background services are not supported by iOS. The .register just doesnt work. If i use .backgroundTask it does not meet my purpose since i want some kind of service that fetches data every 3am/pm, 6am/pm, 9am/pm, 12am/pm. I wondered how chat apps do this. Probably push notifications?