Launching lib/main.dart on iPhone in debug mode…
Xcode build done. 4.8s
Failed to build iOS app
Error (Xcode): redefinition of module ‘AppleTextureEncoder’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/module.modulemap:0:7
Error (Xcode): redefinition of module ‘Compression’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/module.modulemap:5:7
Error (Xcode): redefinition of module ‘Darwin’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/module.modulemap:10:7
Error (Xcode): redefinition of module ‘asl’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/module.modulemap:792:7
Error (Xcode): redefinition of module ‘dnssd’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/dnssd.modulemap:0:7
Error (Xcode): redefinition of module ‘libunwind’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/libunwind.modulemap:0:7
Error (Xcode): redefinition of module ‘unwind’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/libunwind.modulemap:5:7
Error (Xcode): redefinition of module ‘os’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/module.modulemap:798:7
Error (Xcode): redefinition of module ‘os_object’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/module.modulemap:841:7
Error (Xcode): redefinition of module ‘os_workgroup’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/module.modulemap:845:7
Error (Xcode): redefinition of module ‘libkern’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/module.modulemap:855:7
Error (Xcode): redefinition of module ‘kcdata’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/kcdata.modulemap:0:7
Error (Xcode): redefinition of module ‘notify’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/module.modulemap:870:7
Error (Xcode): redefinition of module ‘zlib’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/module.modulemap:875:7
Error (Xcode): redefinition of module ‘SQLite3’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/module.modulemap:881:7
Error (Xcode): redefinition of module ‘CommonCrypto’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/CommonCrypto/module.modulemap:0:7
Error (Xcode): redefinition of module ‘libxml2’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/libxml2/libxml/module.modulemap:0:7
Error (Xcode): redefinition of module ‘ICU’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/unicode/module.modulemap:0:7
Error (Xcode): redefinition of module ‘Dispatch’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/usr/include/dispatch/module.modulemap:0:7
Error (Xcode): too many errors emitted, stopping now
Error (Xcode): could not build module ‘CoreGraphics’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImageDefines.h:16:9
Error (Xcode): could not build module ‘CoreGraphics’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVImageBuffer.h:25:9
Error (Xcode): could not build module ‘CoreGraphics’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageSource.h:13:9
Error (Xcode): could not build module ‘CoreGraphics’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontDescriptor.h:21:9
Error (Xcode): could not build module ‘CoreGraphics’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h:18:9
Error (Xcode): could not build module ‘UIKit’
/Users/username/Desktop/directory/demo/build/ios/Debug-iphonesimulator/Flutter.framework/Headers/FlutterAppDelegate.h:7:8
Error (Xcode): could not build module ‘CoreAudio’
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.2.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CMFormatDescription.h:25:9
Error (Xcode): could not build module ‘Flutter’
/Users/username/Desktop/directory/demo/ios/Runner/GeneratedPluginRegistrant.h:9:8
Error (Xcode): failed to emit precompiled header ‘/Users/username/Library/Developer/Xcode/DerivedData/Runner-cubwxuuxnlzwfqflguxojeurzhux/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-Header-swift_1W69QWNC8JOCM-clang_1YE1HF0U0WLTP.pch’ for bridging header ‘/Users/username/Desktop/Imagine Cup/demo/ios/Runner/Runner-Bridging-Header.h’
Could not build the application for the simulator.
Error launching application on iPhone.
Exited (1).
I have tried deleting the derived data file but it still does not work. I read different solutions but I am still confused what I can do to solve this error. I am not experienced with the iOS software development architecture. Can someone explain this error, what is actually the root of the error and how I can resolve this? The flutter app works on android, web, macOS, anything outside of iOS.




