0

I'm setting up my Flutter build environment on my new M2 MacBook Air. I'm trying to build our company app, which builds fine on my i7 MacBook Pro. I'm getting the error below:

Swift Compiler Error (Xcode): Compiling for iOS 11.0, but module 'amplify_core' has a minimum deployment target of iOS 13.0: 
/source/code/path/build/ios/Debug-dev-iphonesimulator/amplify_core/amplify_core.framework/Modules/amplify_core.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
~/flutter/.pub-cache/hosted/pub.dartlang.org/amplify_analytics_pinpoint_ios-0.5.1/ios/Classes/FlutterAnalytics.swift:22:7

Could not build the application for the simulator.
Error launching application on iPhone SE (3rd generation).

The above error says its building for the x86_64 simulator on my M2? Am I missing a setting somewhere?

EDIT

I can run open ios/Runner.xcworkspace and change the Minimum deployment version of amplify_core to 11.0, but I need a real solution.

enter image description here

1 Answer 1

0

Your project is configured to be for iOS minimum 13.0, which become the minimal version for all pods (dependencies of your project). But at least one of your dependencies has a minimum version less than the required minimal version (set in your project).

You can either set the minimum version for all pods manually (just set the required version to 13.0), or add post-install script in the Podfile of your project like:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
  end
end
Sign up to request clarification or add additional context in comments.

1 Comment

You can also check out this answer stackoverflow.com/questions/77167628/… if you are using flutter

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.