はまったのでメモ。
現象
Xcodeで「Product-Analyze」を実行したときに、以下のエラーが発生して実行できない。
fatal error: malformed or corrupted AST file: 'Unable to load module "/Users/xxxx/Library/Developer/Xcode/DerivedData/ModuleCache/2AI83WDRKQ7VM/Darwin-29XPUSGKOXLVN.pcm": module file not found'
note: after modifying system headers, please delete the module cache at '/Users/xxx/Library/Developer/Xcode/DerivedData/ModuleCache/2AI83WDRKQ7VM'
1 error generated.
試したこと
- プロジェクトのクリーン
- iOS Simulatorの変更(iPhone6にしたりiPhone5にしたり)
- Xcode再起動
- 「please delete the module cache」の指示通り、フォルダを削除
- 「/Users/xxx/Library/Developer/Xcode/DerivedData/」以下全削除 → XCode再起動
- iOS Simulator のリセット。
- iOS Simulatorの起動
- 「iOS Simulator - Reset content and settings」を選択
※注意※ 全シュミレータがリセットされ、設定した情報が全部消えるので、自己責任でお願いします。 - 「Hardware - Device - Manage Devices」を選択
- 左下の「+」を押下し、必要なデバイスを追加
- 「Xcode - Preference - Locations」で「Device Data」の値を「custom」にして自分で指定。
上から順番にやっていき、最後ので解決。
シュミレータをリセットする前に試せばよかった・・・
環境
- Xcode 6.1
- Mac OS 10.9.4