Failed to find a DDI

Hello!

When launching/debugging on my iPad and iPhone I keep getting the following error:

“Previous preparation error: Failed to find a DDI … Run ‘devicectl list preferredDDI’ …”

I believe this was caused by a previously interrupted Xcode update around June due to low disk space, which may have left DeviceSupport/DDI/CoreDevice files incomplete. Even after finishing the update later, the error persists. I now use a new Mac with 4 TB of storage, but the issue still occurs.

Since then I have unfortunately been blocked from testing or presenting my app on devices. It seems that only a new, fully completed Xcode update might resolve the problem.

Tried so far: – Cleared caches (CoreDevice/Devices) – Reset trust on device and re-paired – Checked devicectl list preferredDDI

I would really appreciate guidance, as at the moment I cannot present my app due to this blocking issue.

Thank you very much for your support!

Answered by jsequoia in 858736022

No. Please do not delete all of Xcode and redownload it and resintall it. That's serious overkill for what is probably a very simple problem.

Per the OP, the issue was that the system resources installer got interrupted and left the system if a partially updated state... so just finish that process.

I suggest you run:

xcrun devicectl manage ddis update

That will probably address the issue. If not, the following will reinstallt he the system resources package (including the DDIs):

sudo installer -target / -pkg $(xcode-select -p)/../Resources/Packages/XcodeSystemResources_Full.pkg

Can you provide the output of devicectl list preferredDDI?

— Ed Ford,  DTS Engineer

Hi Ed, thanks for the quick reply. I tried to reply directly in the forum with the requested output, but I keep receiving an error message ("Your post couldn’t be saved. Please try again in a few minutes."). It seems I cannot currently post a follow-up reply. The output: zsh: command not found: devicectl

I got this reply. 😀

I underspecified the exact command there, which is my mistake. The full command is xcrun devicectl list preferredDDI. What's that output?

— Ed Ford,  DTS Engineer

Hello, Ed,

Sorry to jump in here too… ;-)

I have the same problem after upgrading to Xcode Version 26.0 (17A324).

Thanks for mentioning the full command, until now, I had never used the command line for Xcode.

The output states that several DeveloperDiskImages are too old:

file:///Library/Developer/DeveloperDiskImages/iOS_DDI/ file:///Library/Developer/DeveloperDiskImages/tvOS_DDI/ file:///Library/Developer/DeveloperDiskImages/watchOS_DDI/ file:///Library/Developer/DeveloperDiskImages/xrOS_DDI/

"incompatibleContentReason: The DDI's CoreDevice content is too old."

Is it safe to delete them — and hope/pray that they would get properly replaced automatically?

Thanks ;-)

PS: Actually, this is exactly what I will do — and see what will happen…

Hello @haptic! As @Daniel1codes mentioned in his reply to your last message, the best and easiest solution, is to carry out a full delete of Xcode, followed by a re-install from the App Store.

I ran into this issue when I updated to Xcode 26, so I carried out a full delete of Xcode and reinstalled from App Store. This fixed the DDI issue.

Terminal commands used to fully delete Xcode:

sudo rm -rf /Applications/Xcode.app
rm -rf ~/Library/Developer/Xcode  
rm -rf ~/Library/Caches/com.apple.dt.Xcode
rm -rf ~/Library/Developer/CoreSimulator  
rm -rf ~/Library/MobileDevice   

sudo rm -rf /Library/Developer/CommandLineTools

sudo rm -rf /Library/Developer
sudo rm -rf /System/Volumes/Data/Library/Developer

rm -rf ~/Library/Preferences/com.apple.dt.Xcode.plist
rm -rf ~/Library/Application\ Support/Xcode

NOTE: If you are getting 'Operation Not Permitted' when running sudo rm -rf /Library/Developer or sudo rm -rf /System/Volumes/Data/Library/Developer manually delete them in Finder.

No. Please do not delete all of Xcode and redownload it and resintall it. That's serious overkill for what is probably a very simple problem.

Per the OP, the issue was that the system resources installer got interrupted and left the system if a partially updated state... so just finish that process.

I suggest you run:

xcrun devicectl manage ddis update

That will probably address the issue. If not, the following will reinstallt he the system resources package (including the DDIs):

sudo installer -target / -pkg $(xcode-select -p)/../Resources/Packages/XcodeSystemResources_Full.pkg

When a partial install occurs it can cause mismatched bundles across Xcode and /Library/Developer. I tried all of the following, after researching the issue for some time, xcrun devicectl manage ddis update, reinstalling XcodeSystemResources_Full.pkg, xcode-select, CLTs, clearing caches/DerivedData, deleting DDIs, resetting simulators. None worked, still got "Failed to find a DDI". Only a full removal of Xcode and reinstall fixed it.

Running the 2 commands mentioned above may resolve the issue in some cases. However, from what I've seen online after replying to several threads, many people ultimately need a full reinstall. This seems especially common when Xcode was already installed and then updated to Xcode 26 via the App Store.

Many thanks to all of you for the help! @haptic, @jsequoia, @pax26 I was finally able to solve it. I’m incredibly grateful, since it was extremely important and I was running out of time. The final solution was to completely delete Xcode via Terminal and then re-download it. The package remains intact, and now everything runs perfectly. It also works on the devices now. I only had to replace import SwiftCoreUI with import SwiftUI, otherwise everything runs really smoothly.

Failed to find a DDI
 
 
Q