環境
- macOS 27.2 beta
- Xcode 26.3 / 27 beta 両方
症状
Xcode 26.3でコードを入力していると、コード補完が動作するタイミングでXcode自体がクラッシュする。
クラッシュ直前には以下のようなログも出力されていた。
objc: Class _TtC16AppIntentSchemas8Database is implemented in both
/System/Library/PrivateFrameworks/AppIntentSchemas.framework/...
and
/Applications/Xcode26.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/AppIntentSchemas.framework/...
This may cause spurious casting failures and mysterious crashes.
One of the duplicates must be removed or renamed.
ただし、この AppIntentSchemas の重複警告が直接の原因ではなく、macOS 27.2 betaにおけるXcodeのコード補完関連の既知問題っぽい。
該当の話はここにて。
Xcode 27 crashes on keystroke — Co… | Apple Developer Forums
対処方法
ターミナルで以下を実行する。
defaults write com.apple.dt.Xcode CodeCompletionAssetsToLoad /dev/null
その後、Xcodeを完全に終了して再起動する。
これでok
設定を元に戻す
macOS / Xcodeのアップデートで問題が修正されたら、以下で設定を削除できる。
defaults delete com.apple.dt.Xcode CodeCompletionAssetsToLoad
その後Xcodeを再起動する。