I have developed a flutter app which is working fine in windows and also in Mac Android simulator. But when trying to build IOS version I encounter this error which I could not understand. I am new to Mac platform and I am using new M1 chip based mac pc. can any one help me.
Launching lib/Main.dart on iPhone 11 in debug mode... Running Xcode build... Xcode build done. 9.8s Failed to build iOS app Error output from Xcode build: ↳ objc[9080]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x205f97130) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x107c182c8). One of the two will be used. Which one is undefined. objc[9080]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x205f97180) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x107c18318). One of the two will be used. Which one is undefined. --- xcodebuild: WARNING: Using the first of multiple matching destinations: { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device } { platform:iOS Simulator, id:A04818E4-C2CB-44D9-AA6D-BAA874620632, OS:14.4, name:iPad (8th generation) } { platform:iOS Simulator, id:6C8C8FD5-7FE6-4F41-A3BA-C87A5C8C4BA8, OS:15.2, name:iPad (9th generation) } { platform:iOS Simulator, id:FF958655-F39E-474A-8517-44B45784533F, OS:14.4, name:iPad Air (4th generation) } { platform:iOS Simulator, id:2748A806-DFEC-4B09-AD02-7AADBB1B2648, OS:15.2, name:iPad Air (4th generation) } { platform:iOS Simulator, id:57DF8E90-808C-4535-960D-DFD3BB0301C1, OS:14.4, name:iPad Pro (9.7-inch) } { platform:iOS Simulator, id:63DA5C6B-7A91-4E6A-BD69-654C6B8E9DA8, OS:15.2, name:iPad Pro (9.7-inch) } { platform:iOS Simulator, id:F60285AF-14C0-4744-8F05-ADF07FAFE051, OS:14.4, name:iPad Pro (11-inch) (2nd generation) } { platform:iOS Simulator, id:5D910A38-41AB-41F7-9900-2C75E4904A3D, OS:15.2, name:iPad Pro (11-inch) (3rd generation) } { platform:iOS Simulator, id:15F1EF9F-BD15-4017-9EA2-7FC164617034, OS:14.4, name:iPad Pro (12.9-inch) (4th generation) } { platform:iOS Simulator, id:E011014C-D4BD-4C2F-B8EF-AE3BFC7A0E64, OS:15.2, name:iPad Pro (12.9-inch) (5th generation) } { platform:iOS Simulator, id:098DFE97-AD46-4338-9D74-CC71CBCC3DFB, OS:15.2, name:iPad mini (6th generation) } { platform:iOS Simulator, id:CEF7B6EF-8D37-4C93-AC3B-7D1DB0453B3A, OS:14.4, name:iPhone 8 } { platform:iOS Simulator, id:2A3DDE49-ADBB-4FD5-B4A7-9ABB337C66FC, OS:15.2, name:iPhone 8 } { platform:iOS Simulator, id:6C695774-28AC-4CA2-8BDC-B0A4725CAEEB, OS:14.4, name:iPhone 8 Plus } { platform:iOS Simulator, id:A2D38726-5270-4111-8CAE-ED07A2296505, OS:15.2, name:iPhone 8 Plus } { platform:iOS Simulator, id:DFB7A287-AE80-45F5-8B53-8CC076DF5D8E, OS:14.4, name:iPhone 11 } { platform:iOS Simulator, id:E21990B3-0C93-4C21-B483-EB614DAB08FF, OS:15.2, name:iPhone 11 } { platform:iOS Simulator, id:30D5B75A-8B8A-487B-9D63-2603C92F29C5, OS:14.4, name:iPhone 11 Pro } { platform:iOS Simulator, id:36482249-C05D-4DF5-BDA8-15376B0CC9F7, OS:15.2, name:iPhone 11 Pro } { platform:iOS Simulator, id:7B7FBF1A-48D8-40AD-8B31-222EBE2774C9, OS:14.4, name:iPhone 11 Pro Max } { platform:iOS Simulator, id:F0A805AD-B2E2-425F-9A9F-9897E4C2BEEF, OS:15.2, name:iPhone 11 Pro Max } { platform:iOS Simulator, id:76BDAAD0-26C3-4DE3-BB67-27CDD4835C1E, OS:14.4, name:iPhone 12 } { platform:iOS Simulator, id:9C02718D-985F-4A5E-ACCA-23F45F235E3D, OS:15.2, name:iPhone 12 } { platform:iOS Simulator, id:371FACD1-4F69-4377-BC5F-99F1885803D7, OS:14.4, name:iPhone 12 Pro } { platform:iOS Simulator, id:602DD8FB-F7C0-424B-8264-53E7C6E7A4B2, OS:15.2, name:iPhone 12 Pro } { platform:iOS Simulator, id:4123986C-1E64-4D50-9A6C-F4824114F9E6, OS:14.4, name:iPhone 12 Pro Max } { platform:iOS Simulator, id:3937E43B-915B-4B8D-9A64-6BC791AFA214, OS:15.2, name:iPhone 12 Pro Max } { platform:iOS Simulator, id:D8AEA9BB-9FFC-4BA1-9BE6-B1E19ECB2E27, OS:14.4, name:iPhone 12 mini } { platform:iOS Simulator, id:0C9C9E33-D4A4-4747-8C4E-A0EDAC34F8D4, OS:15.2, name:iPhone 12 mini } { platform:iOS Simulator, id:C5FEE243-6781-462A-9CB8-706575E33ECF, OS:15.2, name:iPhone 13 } { platform:iOS Simulator, id:E8CEB22B-90E8-46B6-8F22-0F82CA618108, OS:15.2, name:iPhone 13 Pro } { platform:iOS Simulator, id:6BABCD68-0216-4D60-985D-EFD9D4FB1A80, OS:15.2, name:iPhone 13 Pro Max } { platform:iOS Simulator, id:3B91E7D2-D1CE-443F-BEBA-04C0B7F26598, OS:15.2, name:iPhone 13 mini } { platform:iOS Simulator, id:D1E622FD-330D-4548-936B-98DF800E0E1B, OS:14.4, name:iPhone SE (2nd generation) } { platform:iOS Simulator, id:06D7AB4D-B234-4DD7-BC68-480CBD10D8D4, OS:15.2, name:iPhone SE (2nd generation) } { platform:iOS Simulator, id:0AC1A6C0-34B3-4223-896F-5186D6B2DC4A, OS:14.4, name:iPod touch (7th generation) } { platform:iOS Simulator, id:5DE1F568-CA3F-49EE-BAFA-AA893034754F, OS:15.2, name:iPod touch (7th generation) } { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00008103-000E68982E20801E } { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } ** BUILD FAILED **
Xcode's output: ↳ In file included from /Users/subramanian/Desktop/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.7.1/ios/Classes/JavaScriptChannelHandler.m:5: /Users/subramanian/Desktop/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.7.1/ios/Classes/JavaScriptChannelHandler.h:5:9: fatal error: 'Flutter/Flutter.h' file not found #import <Flutter/Flutter.h> ^~~~~~~~~~~~~~~~~~~ 1 error generated. note: Using new build system note: Planning note: Build preparation complete note: Building targets in dependency order
Could not build the application for the simulator. Error launching application on iPhone 11.
CodePudding user response:
terminal open in project ios module and run sudo gem install cocoapods
CodePudding user response:
check this out
Flutter: CocoaPods's specs repository is too out-of-date to satisfy dependencies
and check the accepted answer, and the comment for M1 chip user, it works for me