0

I am trying to build iOS app from flutter and getting below errors.

enter image description here

1 Answer 1

3

Read https://github.com/flutter/flutter/issues/17749

Check Configuration here

In Short:

Flutter frameworks contain armv7, arm64, and x86_64 slices but NOT i386. When you run in the simulator, Xcode silently maps armv7 to i386 simulator and arm64 to the x86_64 simulator. ONLY_ACTIVE_ARCH=YES build setting builds only for the architecture of the device or simulator you are targeting. Xcode docs:

If enabled, only the active architecture is built. This setting will be ignored when building with a run destination which does not define a specific architecture, such as a 'Generic Device' run destination.

So if you are targeting a real recent iOS device, it will build arm64, and if you target a recent simulator, it will build x86_64. ONLY_ACTIVE_ARCH=YES is the default for the Debug build configuration for new Xcode projects.

If you have ONLY_ACTIVE_ARCH=NO and target a real device, it will build armv7 and arm64 and will succeed. If you target a simulator, it will try to build i386 and x86_64 and fail with this error because i386 is missing. ONLY_ACTIVE_ARCH=NO is the default for Release build configurations for new Xcode projects because you need to publish all valid architectures to the App Store.

Flutter is not supported in Release on the simulator.

Sign up to request clarification or add additional context in comments.

1 Comment

I have added this setting but still getting the issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.