Open3

Xcode errors

Tatsuya YamamotoTatsuya Yamamoto

Flutter Build Error for iOS 18.2 + iOS 18.3.1

以下で修正可能

https://stackoverflow.com/a/79467147

Error (Xcode): unable to rename temporary

エラーの詳細の個人情報は username に変更している。

Error (Xcode): unable to rename temporary '/Users/username/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/2KUPDITZX5Z33/_assert-34OS3XT4C9SUA-c49edc2b.pcm.tmp' to output file '/Users/username/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/2KUPDITZX5Z33/_assert-34OS3XT4C9SUA.pcm': 'No such file or directory'

Parse Issue (Xcode): Could not build module '_assert'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/usr/include/assert.h:57:9

Parse Issue (Xcode): Could not build module 'CoreFoundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:5:9

Parse Issue (Xcode): Could not build module 'CoreFoundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:27:9

Parse Issue (Xcode): Could not build module 'CoreFoundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:17:9
Uncategorized (Xcode): Command SwiftGeneratePch emitted errors but did not return a nonzero exit code to indicate failure

Error (Xcode): no such file or directory: '/Users/username/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation'

Error (Xcode): stat cache file '/Users/username/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.2-22C146-07b28473f605e47e75261259d3ef3b5a.sdkstatcache' not found

Error (Xcode): unable to rename temporary '/Users/username/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/UIEANIHJ09EU/CoreImage-2ADU88VB0BY2P-a8161b41.pcm.tmp' to output file '/Users/username/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/UIEANIHJ09EU/CoreImage-2ADU88VB0BY2P.pcm': 'No such file or directory'

Error (Xcode): could not build module 'CoreImage'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h:12:8

Error (Xcode): could not build module 'UIKit'
/Users/username/path/build/ios/Debug-iphonesimulator/Flutter.framework/Headers/FlutterAppDelegate.h:7:8

Error (Xcode): could not build module 'Flutter'
/Users/username/path/ios/Runner/GeneratedPluginRegistrant.h:9:8

Error (Xcode): failed to emit precompiled header '/Users/username/Library/Developer/Xcode/DerivedData/Runner-fsdcsoniwhiaigfopabfkfrhuqon/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-Header-swift_2VBRO92MZ7YIH-clang_UIEANIHJ09EU.pch' for bridging header '/Users/username/path/ios/Runner/Runner-Bridging-Header.h'

Uncategorized (Xcode): Command PrecompileSwiftBridgingHeader emitted errors but did not return a nonzero exit code to indicate failure

Uncategorized (Xcode): Command SwiftCompile failed with a nonzero exit code

Uncategorized (Xcode): Command SwiftEmitModule failed with a nonzero exit code

Could not build the application for the simulator.
Error launching application on iPhone 16 Pro.

Exited (1).
Tatsuya YamamotoTatsuya Yamamoto

Xcode > Settings > Locations で Derived Datacustom にして、以下をテキストフィールドに入力して enter を押すと自動でフォルダが作られる。

/Users/username/Library/Developer/Xcode/DerivedDataCusom

username はそれぞれの mac の設定
DerivedDataCustom は自分で名前つける

Tatsuya YamamotoTatsuya Yamamoto

いつでも戻せるようにメモしておいた。

あとは個人でエイリアス設定しているなら新しいものも変えておく。
DerivedData を消すコマンドを別で設定しているなら変更する。

alias clean='rm -rf ~/Library/Developer/Xcode/DerivedData; rm -rf ~/Library/Developer/Xcode/DerivedDataCustom'