I am working on a Flutter application which makes use of the following package: https://pub.dev/packages/flutter_mapbox_navigation
While running this for iOS 15.2 Simulator I am getting the following error:
Swift Compiler Error (Xcode): Could not find module 'MapboxDirections' for target 'arm64-apple-ios-simulator'; found: i386, x86_64-apple-ios-simulator, x86_64, i386-apple-ios-simulator, at: /Users/absatyaprakash/Projects/one-stop-2021/app/one_stop/build/ios/Debug-iphonesimulator/MapboxDirections/MapboxDirections.framework/Modules/MapboxDirections.swiftmodule
/Users/absatyaprakash/Projects/one-stop-2021/app/one_stop/ios/Pods/MapboxNavigation/Sources/MapboxNavigation/Array.swift:0:7
I am using an Apple Silicon MacBook. Initially, I was facing the issue described here - Xcode 12, building for iOS Simulator, but linking in an object file built for iOS, for architecture 'arm64', but after excluding the arm64 architecture from the Build Settings, and adding the following to my Podfile:
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
I am not getting this anymore. Now I am stuck at the above mentioned issue. I have tried numerous solutions (including the one here - could not find module 'Alamofire' for target 'arm64-apple-ios-simulator'; found: x86_64-apple-ios-simulator, x86_64) since the last 2 days, but nothing seems to help.