跪拜 Guibai
← Back to the summary

macOS 27 Xcode Traps: Phantom 'Not Paired' Error and Simulator Crash from App Translocation

Two Xcode pitfalls on macOS 27: DDI mismatch on real devices and simulator App Translocation

Environment: macOS 27 / Xcode 26.6 + Xcode 27.1 / iPhone 12 iOS 26.6 Keywords: DDI, CoreDevice, devicectl, App Translocation, Gatekeeper, SimulatorKit

Recently I ran into two typical pitfalls on macOS 27, where the error messages are quite misleading:

  1. Xcode reports must be paired / Failed to find a DDI on a real device, but pairing is not actually broken;
  2. The iOS simulator crashes on launch, and the common advice to reinstall Xcode does not work.

These two problems look unrelated, but the root cause is the same: macOS system-level components / security mechanisms are not aligned with the actual state of Xcode.

Below is a quick reference, followed by complete troubleshooting and fix commands.


Quick reference: question → answer

Q: The device reports The device must be paired before it can be connected. Is pairing broken? A: Not necessarily. In this article, the pairing status was always paired / connected / Developer Mode enabled. The real problem is that the system DDI is too old and does not match the CoreDevice framework version.

Q: How to quickly confirm a DDI problem on a real device? A: Run:

xcrun devicectl list preferredDDI

Check whether the iOS section shows:

contentIsCompatible: false
isUsable: false
The DDI's CoreDevice content is too old

Q: How to fix the DDI problem on a real device? A: Expand XcodeSystemResources.pkg from the Xcode 27.1 installer package, extract the new CandidateDDIs, then use devicectl manage ddis update with the new source explicitly specified, and turn off the old candidate sources.

Q: The simulator pops up "Simulator cannot be opened due to a problem." Is it an Xcode version mismatch? A: Most often not. The real cause is Gatekeeper's App Translocation mounting Simulator.app to a read-only path at random, so dyld cannot find SimulatorKit.framework.

Q: How to quickly confirm the simulator problem? A: Look at whether the crash log's procPath contains AppTranslocation, and check:

xattr -p com.apple.quarantine /Applications/Xcode.app 2>&1
xattr -p com.apple.quarantine /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app 2>&1

If it shows com.apple.quarantine: 00c1;..., that's it.

Q: How to fix the simulator problem? A: Remove the quarantine attribute from the top-level Xcode.app and Simulator.app. Do not recurse through the entire Xcode from the start.


1. Real device reports must be paired: don't fix pairing, check DDI first

1. Symptoms

When running on a real device, Xcode shows:

Previous preparation error: The device must be paired before it can be connected.

Or:

Failed to find a DDI that can be used to enable Core Device built-in services on the device.

But the device status is actually fine:

Pairing: paired | Tunnel: connected | Developer Mode: enabled

So do not replug the cable, reset trust, or re-pair. Most likely that will be wasted effort.

2. Root cause in one sentence

The CoreDevice framework on the system is the new version:

CoreDevice 651.13.5

But the developer disk image (DDI) on the system is still old:

CoreDevice-518.33

The versions do not match, so the device's built-in services cannot start, device preparation fails, and the upper layer reports a vague "not paired" message.

A simple analogy:

3. Locate it in 10 seconds

xcrun devicectl list preferredDDI

Pay attention to the iOS section:

contentIsCompatible: false
isUsable: false
The DDI's CoreDevice content is too old

If it shows false, that's the DDI mismatch.

4. Why doesn't simply running update work?

Many people's first reaction is:

xcrun devicectl manage ddis update --timeout 300

But by default it looks for candidates from:

If all of these contain old DDIs, the update will still give you the old disk.

5. Correct fix: extract the new DDI from the Xcode 27.1 installer package

First, back up the old images:

cp -a /Library/Developer/DeveloperDiskImages /tmp/ddi_backup_$(date +%Y%m%d_%H%M%S)

Expand the Xcode 27.1 system resources package:

rm -rf /tmp/ddi271
pkgutil --expand-full \
  "/Applications/Xcode 27.1.app/Contents/Resources/Packages/XcodeSystemResources.pkg" \
  /tmp/ddi271

Install with the new DDI source specified:

SRC=/tmp/ddi271/Payload/Library/Developer/CoreDevice/CandidateDDIs

xcrun devicectl manage ddis update \
  --source-dir "$SRC" \
  --clean \
  --no-include-coredevice \
  --no-include-xcode \
  --timeout 300

The last two parameters are the key:

6. Verification

xcrun devicectl list preferredDDI

Expected result:

buildUpdate: 27A9275
contentIsCompatible: true
CoreDevice-651.13.5
isUsable: true

Then run an end-to-end test:

xcrun devicectl device info lockState --device <UDID> --timeout 25

If it returns normally, the channel is working.

If the output mentions No DDI was found for the macOS / rtKitOS platform, it is unrelated to iOS real devices; ignore it.

7. Still failing after the fix? Two follow-up traps

Trap 1: Previous preparation error is cached.

After the underlying fix, the Xcode UI may still show a yellow message. You must fully quit Xcode with ⌘Q and reopen it. If necessary, replug the USB cable.

Trap 2: iOS 26.6 real device + Xcode 26.6 SDK only goes up to iOS 26.5.

If after fixing the DDI the error changes to "device system version not supported," don't go back to messing with the DDI. Just use Xcode 27.1.

8. Prevent recurrence

Keep a copy of the new DDI source:

mkdir -p ~/Library/Developer/CoreDeviceDDIs-Xcode27.1
cp -R "$SRC"/. ~/Library/Developer/CoreDeviceDDIs-Xcode27.1/

If it recurs, rerun:

xcrun devicectl manage ddis update \
  --source-dir ~/Library/Developer/CoreDeviceDDIs-Xcode27.1 \
  --clean \
  --no-include-coredevice \
  --no-include-xcode \
  --timeout 300

To eliminate it entirely, you need an admin password:

sudo installer -pkg "/Applications/Xcode 27.1.app/Contents/Resources/Packages/XcodeSystemResources.pkg" -target /

2. macOS 27 simulator won't open: not a reinstall, it's App Translocation

1. Symptoms

Running the iOS simulator immediately shows:

“Simulator” cannot be opened due to a problem.
Please contact the developer to ensure Simulator works with this macOS version.

Reinstalling Xcode, reinstalling Command Line Tools, and deleting DerivedData all had no effect.

2. The real culprit in the crash log

Look at the latest crash report:

ls -lt ~/Library/Logs/DiagnosticReports/ | grep -i simulator

Key fields:

procPath: /private/var/.../T/AppTranslocation/<UUID>/d/Simulator.app/Contents/MacOS/Simulator
termination.indicator: Library missing
Library not loaded: @rpath/SimulatorKit.framework/Versions/A/SimulatorKit

In other words: Simulator.app was randomly mounted to a read-only path by Gatekeeper, so when it launched, dyld could not find SimulatorKit.framework and directly crashed with SIGABRT.

3. Why does Simulator.app specifically hit this?

Simulator.app is a nested app inside Xcode:

/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app

It does not bundle SimulatorKit.framework inside its own bundle; instead, it relies on a relative path to look back into Xcode's internal private frameworks.

Once App Translocation randomly relocates it, the parent directory structure changes, the relative backtrack breaks, and the framework cannot be found.

4. Confirm the quarantine attribute

xattr -p com.apple.quarantine /Applications/Xcode.app 2>&1
xattr -p com.apple.quarantine /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app 2>&1

If the output looks like:

com.apple.quarantine: 00c1;...

That's it. Common sources are AirDrop, USB drives, or old backup copies that were never formally approved by Finder.

5. Recommended fix: clear the top-level quarantine attribute

xattr -d com.apple.quarantine "/Applications/Xcode.app"
xattr -d com.apple.quarantine "/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app"

Note:

If you prefer not to type commands, you can also double-click Xcode.app in Finder once, or drag it to the desktop and back to /Applications, to let the system "approve" it.

If that still doesn't work, rebuild Launch Services:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister \
  -kill -r -domain local -domain system -domain user

Only as a last resort consider:

sudo xattr -dr com.apple.quarantine "/Applications/Xcode.app"

6. Verification

open -a "/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app"
pgrep -fl "Simulator.app/Contents/MacOS/Simulator"
xcrun simctl list devices | grep -i booted
ls -lt ~/Library/Logs/DiagnosticReports/ | grep -i simulator

Expected:

7. Further trap: simulator opens ≠ app runs

On macOS 27, there may only be arm64-only simulator runtimes. If an old fat library lacks the arm64-simulator slice, you'll see:

building for iOS Simulator, but linking in object file built for iOS

Practical solutions:

  1. Debug directly on a real device;
  2. Install a Universal iOS simulator runtime with Rosetta;
  3. Push SDKs to provide .xcframework and add the arm64-simulator slice.

Also:


3. A final troubleshooting checklist

Real-device problems:

xcrun devicectl list devices -v
xcrun devicectl list preferredDDI
xcrun devicectl device info lockState --device <UDID> --timeout 25
xcode-select -p

Simulator problems:

ls -lt ~/Library/Logs/DiagnosticReports/ | grep -i simulator
xattr -p com.apple.quarantine /Applications/Xcode.app 2>&1
xattr -p com.apple.quarantine /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app 2>&1

Remember two sentences:

When a real device reports "not paired," check DDI compatibility first. When the simulator won't open, first look at whether the crash path contains AppTranslocation.

These two steps will save a lot of time spent on reinstalling and resetting.