My independent watch app successfully initiates a background task with WKExtension.scheduleBackgroundRefresh and then uses URLSession and URLSessionConfiguration to launch a background download task URLSessionDownloadTask. This successfully completes, as I can see from the logs: file is downloaded into a temp file.
Context: Xcode Version 12.0 beta 2, watchOS beta 2 in the Simulator (not on real device).
This happens in my ExtensionDelegate when my app's complication is in the watch face.
But then the download task is not completed in the URLSessionDownloadDelegate, since in the log com.apple.nsurlsessiond says:
So, how can I add support for launch-on-demand for my app and give the notification to satisfy nsurlsessiond?
I've seen some discussions that this would work on a real device. However cannot test this yet on an Apple Watch with watchOS beta 7.
Context: Xcode Version 12.0 beta 2, watchOS beta 2 in the Simulator (not on real device).
This happens in my ExtensionDelegate when my app's complication is in the watch face.
But then the download task is not completed in the URLSessionDownloadDelegate, since in the log com.apple.nsurlsessiond says:
Code Block language Will wake client com.organization.appname.watchkitapp.watchkitextension for session app-session-id-on-background if we receive a notification that it supports launch-on-demand
So, how can I add support for launch-on-demand for my app and give the notification to satisfy nsurlsessiond?
I've seen some discussions that this would work on a real device. However cannot test this yet on an Apple Watch with watchOS beta 7.