Hi,
I’m testing Apple-hosted Managed Background Assets in a macOS TestFlight build. When an asset pack download is already scheduled, statusUpdates(forAssetPackWithID:) intermittently emits no events, even though the download appears in the current downloads list.
- macOS 27.2.1 / Apple M4 Pro
- TestFlight 4.0.1 (570.1) / Xcode 27.2
- Call
checkForUpdates()to retrieve the latest asset pack information. - After receiving the result, look up the corresponding
AssetPack. - Call
ensureLocalAvailability(of:)with that pack to start the download.- We use
ensureLocalAvailability(of:)rather thanensureLocalAvailability(of:requireLatestVersion:)to maintain compatibility with macOS versions earlier than 26.4.
- We use
- Obtain exclusive control using
withExclusiveControl. - Call
BADownloadManager.fetchCurrentDownloads()to check for existing downloads. - If the target pack is listed, do not call
ensureLocalAvailability(of:)again, since it may return an error because a request is already scheduled. Instead, subscribe tostatusUpdates(forAssetPackWithID:)to track the existing download.
When things work as expected, the download resumes and .downloading events are received. Intermittently, however, the pack remains in the downloads list but no statusUpdates events arrive. If we quit and relaunch the app again, events sometimes start arriving.
When the download resumes normally, the Managed Background Assets Helper Service logs the following sequence:
Managed Background Assets Helper Service
[0x7c7cc71040] activating connection: mach=true listener=false peer=false name=com.apple.trustd.agent
Managed Background Assets Helper Service
The app with the bundle ID com.xx.xx is configured to use Apple hosting.
Managed Background Assets Helper Service
Asking the TestFlight extension via the App Store Dæmon for the URL request to use to fetch the download manifest...
When the issue occurs, we see the connection to com.apple.trustd.agent, but no subsequent Apple-hosting or manifest-request logs in the captured interval:
Managed Background Assets Helper Service
[0x7a50c75040] activating connection: mach=true listener=false peer=false name=com.apple.trustd.agent
- When subscribing to
statusUpdatesfor an already scheduled download, is it expected that no event may be emitted to report the download’s current state? - If the download is listed by
fetchCurrentDownloads()butstatusUpdatesemits no events, what is the recommended way to monitor its progress and completion? - Is it a known issue for the Helper Service not to proceed to the manifest request? What additional logs or diagnostics would help identify the cause?
Thank you.