func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
let taskIdentifier = "com.company.myappname.refresh"
BGTaskScheduler.shared.register(forTaskWithIdentifier: taskIdentifier, using: nil) { task in
debugMsg(msg: "worked!")
}
The code above esults in the following error:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Launch handler for task with identifier com.att.NorthStar.refresh has already been registered'
trying to understand what I'm doing wrong. I get this error on a brand new install and there are no other ".register" references in the app.