MacOSX Sonoma 14.7 + XCode 16.0 + iOS 17.6.1:

I am trying to install an app from a XCode project onto a iOS 17.6.1 device. The Macbook is a MacOSX Sonoma 14.7, Apple M2 Pro. I'm running XCode 16.0. I receive a series of alerts before receiving the final message.

I tried to delete everything in this folder:

rm ~/Library/Caches/com.apple.dt.Xcode/Downloads/*

I reviewed the XCode components currently installed:

I downloaded more runtime simulators from this link. I then followed the instructions provided in this link. For example:

xcrun simctl runtime add "~/Downloads/iOS_17.4_Simulator_Runtime.dmg"
xcrun simctl runtime add "~/Downloads/iOS_17.5_Simulator_Runtime.dmg"

I'm still getting a message beside the device I want to install my app:

The Developer Disk Image Could Not Be Staged On The Host

I need help. I don't know what else to do. I don't see any matching simulators available for 17.6.1 and 17.7. Does anyone have any ideas?

Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. I'd greatly appreciate it if you could open a bug report, include a sysdiagnose, and post the FB number here once you do. Bug Reporting: How and Why? has tips on creating your bug report.

Here is the FB number: FB15289146

Thank you!

It'd be helpful if you could attach the output of devicectl diagnose to your bug report while your Mac is in this state to help us address the underlying issue.

However, as we investigate to ultimately fix the root issue, that will take time, so let's see if we can find you a workaround so that you can continue to develop. This comes down to there being something unusual about your Mac's overall state that's preventing Xcode from making the connection to the device. It's unlikely a clean macOS install would exhibit this issue, as a reference point.

First, please get the output to the following commands and share them here in case they shed some light on the situation:

xcrun devicectl list preferredDDI
xcrun devicectl device info ddiServices --device <Device Identifier>

Next, do a simple reboot of your Mac, since your notes don't list if you tried that.

If rebooting doesn't help, can you check the permissions on your temporary folder are correct? You can run this command:

sudo chmod 0777 /private/var/tmp

I don't expect that will help here, but it's a simple thing to try that does address some form of these errors, though I also have suspicions that your circumstances may not match those cases.

— Ed Ford,  DTS Engineer

Thanks for your reply...

Here is the information you have requested:

Request

xcrun devicectl list preferredDDI

Response

Host CoreDevice version: 397.21
The DDI used for the iOS platform:
• hostDDI: file:///Library/Developer/DeveloperDiskImages/iOS_DDI.dmg
▿ ddiMetadata:
    • buildUpdate: 16A242d
    • contentIsCompatible: true
    • coreDeviceVersionChecksIncludeDevelopmentRevision: true
    • developmentRevision: 0
    • enforcingCoreDeviceVersionChecks: true
    • platform: iOS
    ▿ projectMetadata:
        • Citrine-94
        • CoreDevice-397.21
        • DTDeveloperDiskImageSupport-14.0.0
        • DTOCMock-23002
        • GPUToolsDevice_DDI-300.21
        • JetsamProperties-2205
        • LiveExecutionResultsLogger-20002
        • Mercury-54
        • XCTest-23196
    • isUsable: true
    • variant: external
The DDI used for the tvOS platform:
• hostDDI: file:///Library/Developer/DeveloperDiskImages/tvOS_DDI.dmg
▿ ddiMetadata:
    • buildUpdate: 16A242d
    • contentIsCompatible: true
    • coreDeviceVersionChecksIncludeDevelopmentRevision: true
    • developmentRevision: 0
    • enforcingCoreDeviceVersionChecks: true
    • platform: tvOS
    ▿ projectMetadata:
        • Citrine-94
        • CoreDevice-397.21
        • DTDeveloperDiskImageSupport-14.0.0
        • DTOCMock-23002
        • GPUToolsDevice_DDI-300.21
        • JetsamProperties-2205
        • LiveExecutionResultsLogger-20002
        • Mercury-54
        • XCTest-23196
    • isUsable: true
    • variant: external
The DDI used for the watchOS platform:
• hostDDI: file:///Library/Developer/DeveloperDiskImages/watchOS_DDI.dmg
▿ ddiMetadata:
    • buildUpdate: 16A242d
    • contentIsCompatible: true
    • coreDeviceVersionChecksIncludeDevelopmentRevision: true
    • developmentRevision: 0
    • enforcingCoreDeviceVersionChecks: true
    • platform: watchOS
    ▿ projectMetadata:
        • Citrine-94
        • CoreDevice-397.21
        • DTDeveloperDiskImageSupport-14.0.0
        • DTOCMock-23002
        • GPUToolsDevice_DDI-300.21
        • JetsamProperties-2205
        • LiveExecutionResultsLogger-20002
        • Mercury-54
        • XCTest-23196
    • isUsable: true
    • variant: external
The DDI used for the visionOS platform:
• hostDDI: file:///Library/Developer/DeveloperDiskImages/xrOS_DDI.dmg
▿ ddiMetadata:
    • buildUpdate: 16A242d
    • contentIsCompatible: true
    • coreDeviceVersionChecksIncludeDevelopmentRevision: true
    • developmentRevision: 0
    • enforcingCoreDeviceVersionChecks: true
    • platform: xrOS
    ▿ projectMetadata:
        • Citrine-94
        • CoreDevice-397.21
        • DTDeveloperDiskImageSupport-14.0.0
        • DTOCMock-23002
        • GPUToolsDevice_DDI-300.21
        • JetsamProperties-2205
        • LiveExecutionResultsLogger-20002
        • Mercury-54
        • XCTest-23196
    • isUsable: true
    • variant: external

Other Request

xcrun devicectl device info ddiServices --device <My UDID>

Other Response

10:18:53  Acquired tunnel connection to device.
10:18:53  Enabling developer disk image services.
ERROR: The developer disk image could not be staged on the host. (com.apple.dt.CoreDeviceError error 12045 (0x2F0D))
       NSURL = file:///Library/Developer/DeveloperDiskImages/iOS_DDI.dmg
       DeviceIdentifier = FC91CD07-395E-4AD4-826B-FECB15FCB740
--------------------------------------------------------------------------------
ERROR:     Couldn’t communicate with a helper application. (NSCocoaErrorDomain error 4099 (0x1003))
           NSDebugDescription = The connection to service created from an endpoint was invalidated: failed at lookup with error 9 - Bad file descriptor.

As far as the sudo chmod 0777 /private/var/tmp, the root user owns that folder.

I've also added additional information to the ticket I submitted.

Thanks for all that you are doing for me. I'm humbled and am grateful.

One other easy test you can do is to create a brand new macOS user account, and see what happens when you try to build and run to your device from that new account. That would provide information about an issue pertaining to your setup at the user account level, or at the broader macOS system level. And if a new macOS user account is able to connect to the device, that then provides you a workaround while we investigate your bug report so that your development efforts are not blocked.

—Ed Ford,  DTS Engineer

MacOSX Sonoma 14.7 + XCode 16.0 + iOS 17.6.1:
 
 
Q