I wanted to add a background task for iOS13, to replace a setMinimumBackgroundFetchInterval for earlier iOS versions since Fire kindly pointed out it was obsolete
So, I added the BackgroundTasks reference and started with the BGTaskScheduler.shared.register as per https://developer.apple.com/documentation/backgroundtasks/bgtaskscheduler?language=objc but Fire says there is no such static member (.shared) and certainly there’s no code completion so am I missing something or is it an issue?
Secondly, I need to support from iOS9 onwards, so have my deployment target set to this, but obviously it doesn’t know about background tasks, and whilst I know I can use
if available(“iOS 13.0”)
for the code, if I try and run it on a simulator earlier than iOS13, then it hangs on startup with
dyld: Library not loaded: /System/Library/Frameworks/BackgroundTasks.framework/BackgroundTasks
Finally, for development testing, is there a way we can do something like this in Fire https://developer.apple.com/documentation/backgroundtasks/starting_and_terminating_tasks_during_development?language=objc ?