We are developing a watchOS application that records long audio sessions and uploads them to our backend in chunks (~5 MB each) using pre-signed URLs and URLSession background upload.
Current behavior:
While audio recording is active, uploads continue successfully even when the app is in the background.
Once the recording stops, if multiple chunks (e.g., 10+) are still pending, the remaining uploads do not proceed in the background and appear to be suspended.
We attempted to use WKExtendedRuntimeSession (mindfulness type) to allow sufficient time to enqueue background upload tasks, but the session is invalidated when the app goes to the background (e.g., wrist down or app inactive), which prevents reliable scheduling of uploads.
Additionally, we added the entitlement:
com.apple.developer.extended-runtime-session (mindfulness)
in the Watch app entitlements file, but Xcode automatic signing fails with:
“Provisioning profile does not include the com.apple.developer.extended-runtime-session entitlement.”
It appears that the provisioning profile is not being updated to include this entitlement.
Our questions:
Is WKExtendedRuntimeSession (mindfulness) expected to support scheduling background URLSession uploads after the app goes to background?
How should we reliably complete pending background uploads on watchOS after a long recording session ends?
Is there any additional entitlement or recommended approach for this use case?
Why is the extended runtime entitlement not being applied to the provisioning profile despite being added in the entitlements file?
We are aiming to follow Apple-recommended practices for long-running tasks and background uploads on watchOS.
Any guidance would be greatly appreciated.
Topic:
App & System Services
SubTopic:
Processes & Concurrency
Tags:
WatchKit
watchOS
Background Tasks
CFNetwork
2
0
105