title: Could not find module 'MapboxDirections' for target 'arm64-apple-ios-simulator'; found: i386, x86_64-apple-ios-simulator, x86_64
body: <p>I am working on a Flutter application which makes use of the following package:
  <a href="https://pub.dev/packages/flutter_mapbox_navigation" rel="nofollow noreferrer">https://pub.dev/packages/flutter_mapbox_navigation</a></p>
  <p>While running this for iOS 15.2 Simulator I am getting the following error:</p>
  <pre><code>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
  </code></pre>
  <p>I am using an Apple Silicon MacBook. Initially, I was facing the issue described here - <a href="https://stackoverflow.com/questions/63607158/xcode-12-building-for-ios-simulator-but-linking-in-an-object-file-built-for-io">Xcode 12, building for iOS Simulator, but linking in an object file built for iOS, for architecture &#39;arm64&#39;</a>, but after excluding the arm64 architecture from the Build Settings, and adding the following to my Podfile:</p>
  <pre><code>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[&quot;EXCLUDED_ARCHS[sdk=iphonesimulator*]&quot;] = &quot;arm64&quot;
      end
    end
  end
  </code></pre>
  <p>I am not getting this anymore. Now I am stuck at the above mentioned issue. I have tried numerous solutions (including the one here - <a href="https://stackoverflow.com/questions/65561337/could-not-find-module-alamofire-for-target-arm64-apple-ios-simulator-found">could not find module &#39;Alamofire&#39; for target &#39;arm64-apple-ios-simulator&#39;; found: x86_64-apple-ios-simulator, x86_64</a>) since the last 2 days, but nothing seems to help.</p>