작성
·
138
0
안녕하세요. (원격리퀘스트 링크 / [코드팩토리 디스코드])들이 다 deactiavte되서 여기에 질문남깁니다.
현재 m4 mac mini사용중이고, 처음에 셋업할떄 잘 돌아갔는데 3일있고? 다시 ios 시뮬레이터를 실행하려고 하니 다음과 같은 에러가 나는데 익숙치 않아서 해결하기가 어렵습니다. 혹시 도움을 받을 수 이있을까요?
Launching lib/main.dart on iPhone 16 in debug mode...
Running Xcode build...
Xcode build done. 5.9s
Failed to build iOS app
Uncategorized (Xcode): Command SwiftGeneratePch emitted errors but did not return a nonzero exit code to indicate failure
Error (Xcode): unable to rename temporary '/Users/yh/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/1QOPLZ3HJICL2/Darwin-1R6EHFV0M8ED3-1ed5905f.pcm.tmp' to output file '/Users/yh/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/1QOPLZ3HJICL2/Darwin-1R6EHFV0M8ED3.pcm': 'No such file or directory'
Error (Xcode): could not build module 'Darwin'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:74:9
Error (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
Error (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
Error (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
Error (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
Error (Xcode): could not build module 'CoreFoundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:11:9
Error (Xcode): could not build module 'CoreGraphics'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImageDefines.h:16:9
Error (Xcode): could not build module 'CoreFoundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVBase.h:23:9
Error (Xcode): could not build module 'CoreFoundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h:36:9
Error (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
Error (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
Error (Xcode): could not build module 'CoreFoundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/ImageIO.framework/Headers/ImageIOBase.h:15:9
Error (Xcode): could not build module 'CoreFoundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontTraits.h:13:9
Error (Xcode): could not build module 'CoreFoundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h:15:9
Error (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
Error (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
Error (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
Error (Xcode): could not build module 'UIKit'
/Users/yh/Documents/flutter/build/ios/Debug-iphonesimulator/Flutter.framework/Headers/FlutterAppDelegate.h:7:8
Error (Xcode): could not build module 'CoreFoundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CMBase.h:167:9
Error (Xcode): could not build module 'CoreFoundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/CoreAudioTypes.framework/Headers/CoreAudioBaseTypes.h:17:9
Error (Xcode): could not build module 'CoreAudioTypes'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudioTypes.h:3:9
Error (Xcode): could not build module 'Flutter'
/Users/yh/Documents/flutter/ios/Runner/GeneratedPluginRegistrant.h:9:8
Error (Xcode): failed to emit precompiled header '/Users/yh/Library/Developer/Xcode/DerivedData/Runner-ecakosngbcpobydbbdtaqetzklos/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-Header-swift_1F00NIMTMLDS3-clang_1QOPLZ3HJICL2.pch' for bridging header '/Users/yh/Documents/flutter/ios/Runner/Runner-Bridging-Header.h'
Uncategorized (Xcode): Command PrecompileSwiftBridgingHeader emitted errors but did not return a nonzero exit code to indicate failure
Swift Compiler Error (Xcode): No such file or directory: '/Users/yh/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation'
Swift Compiler Error (Xcode): Stat cache file '/Users/yh/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.2-22C146-07b28473f605e47e75261259d3ef3b5a.sdkstatcache' not found
Swift Compiler Error (Xcode): Clang importer creation failed
Could not build the application for the simulator.
Error launching application on iPhone 16.
답변 2
0
안녕하세요!
처음 보는 에러인데 상당히 정상적인 상황은 아닌 것 같습니다.
특히나 기존에는 실행이 잘 됐다는점이 매우 걸리는데요 XCode 및 Simulator 재설치 후 재시도 부탁드립니다.
추가로, 프로젝트를 생성한 폴더가 iCloud 연동된 폴더는 아닌지, flutter SDK 포함 환경설정한 모든 소프트웨어가 iCloud 또는 타 클라우드사 연동 돼있는 상황이 아닌지 확인 부탁드립니다.
감사합니다!
0
안녕하세요, 인프런 AI 인턴입니다. rrallvv .J님. 당신이 경험하신 문제는 Xcode에서 iOS 시뮬레이터를 사용하는 동안 Swift 컴파일러 관련 오류로 인해 Flutter 프로젝트 빌드가 실패하는 경우입니다. 이러한 문제는 주로 캐시 문제나 파일 경로 문제로 인해 발생할 수 있습니다. 아래의 해결책을 시도해 보시기 바랍니다.
rm -rf ~/Library/Developer/Xcode/DerivedData
flutter clean
flutter pub get
ios
디렉토리의 .xcworkspace
파일을 Xcode로 열고 Build Settings에서 Objective-C Bridging Header 설정을 확인하세요.관련 유사한 문제와 해결 방법이 언급된 기존 질문을 참조해주세요:
위의 방법들을 참고하시면 문제 해결에 도움이 될 수 있습니다. 계속해서 문제가 해결되지 않는 경우, 추가적인 정보를 제공해 주시면 더 구체적인 도움을 드리겠습니다.
저는 질문자님의 이해를 돕고자 지식공유자님의 기존 답변을 참고하여 유사한 답변 링크를 추천해드리고 있습니다. 현재 베타 기능으로 답변이 만족스럽지 않을 수 있는 점 양해 부탁드립니다. 🙏
추가적으로 궁금한 점이 있으시면, 이어서 질문해 주세요. 곧 지식공유자께서 답변해 주실 것입니다.
제 모든 링크는
https://inf.run/V7ski
에서 찾아보실 수 있습니다.