💊
Flutter + macOS のエラー unable to rename temporary
エラーの内容
Launching lib/main.dart on 18.3.1 / iPhone 16 in debug mode...
Xcode build done. 11.6s
Failed to build iOS app
Error (Xcode): unable to rename temporary '/Users/****(name)/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/395MK8NAFORK4/CoreFoundation-18CWDCA31ANYQ-8f3db254.pcm.tmp' to output file '/Users/****(name)/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/395MK8NAFORK4/CoreFoundation-18CWDCA31ANYQ.pcm': 'No such file or directory'
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 'Foundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:7:8
Parse Issue (Xcode): Could not build module 'Foundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImageDefines.h:18:8
Parse Issue (Xcode): Could not build module 'Foundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h:14:8
Parse Issue (Xcode): Could not build module 'IOSurface'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBufferIOSurface.h:25:9
Parse Issue (Xcode): Could not build module 'Foundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h:7:9
Parse Issue (Xcode): Could not build module 'Foundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h:7:8
Parse Issue (Xcode): Could not build module 'Foundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h:11:8
Parse Issue (Xcode): Could not build module 'Foundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/Symbols.framework/Headers/Symbols.h:7:8
Parse Issue (Xcode): Could not build module 'Foundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h:7:8
Parse Issue (Xcode): Could not build module 'Foundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/NSString+UserNotifications.h:7:8
Parse Issue (Xcode): Could not build module 'UIKit'
/Users/****(name)/Works/Around/around/ios/Pods/Target%20Support%20Files/shared_preferences_foundation/shared_preferences_foundation-prefix.pch:1:8
Could not build the application for the simulator.
Error launching application on 18.3.1 / iPhone 16.
対応
Xcodeの環境設定でDerived Dataを(Defaultから)Relativeにした。
ただし、
- なぜエラーが出たのか
- なぜこの方法でエラーが出なくなったのか
は把握していない。
Discussion