'Flutter IOS Architecture Issue in M1 Mac using VS code
I am using an M1 MacBook pro laptop and ios 13 simulator for developing a flutter app, But I am getting the below issue while trying to run the flutter app in the emulator.
This started happening when I upgraded my workspace to Flutter 2.8. No problem while running in Android.
Please advise how to resolve this issue.
Kindly do not advise me to do the development in Xcode. I am not familiar and do not have enough bandwidth to learn new IDE. I am using VSCODE.
Launching lib/main.dart on iPhone 13 in debug mode...
lib/main.dart:1
Updating project for Xcode compatibility.
Upgrading Runner.xcscheme
Xcode build done. 1.5s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in parallel
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from project 'Runner')
/Users/path/to/flutter/project/projectname/ios/Runner.xcodeproj: error: The linked framework 'Pods_Runner.framework' is missing one or more architectures required by this target: x86_64.
Could not build the application for the simulator.
Error launching application on iPhone 13.
Exited (sigterm)
Solution 1:[1]
Specify one more architecture for m1 chip.
Runner > Build Settings > Excluded Architecture > Add arm64
This solution worked for me.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | adak |