Apple Silicon - Could not find module *** for target 'x86_64-apple-ios-simulator'

Hello,

I recently got a Mac with the Apple Silicon chip and I wanted to build an xCode iOS project but I have some issues:

The project contains Pods and Swift Packages. At the begining I was not able to run the application at all and always got the following error:
Could not find module '***' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator

After some research, I found that many people have solved this problem by changing the property "Exclude Architectures" on the Build Settings (both for the main project and the pods) to "Any iOS simulator SDK - arm64". After doing this, I was able to run the app on a physical device and on the mac target (designed for iPad) but the simulators and SwiftUI Preview still doesn't work.

Do you have any solution for this problem ?

Thank you by advance !

Replies

Is that module built with CocoaPods? Or as a Swift package?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
  • I'm having the issue for Swift Packages!

Add a Comment
If I didn't set "Excluded Architectures" to "arm64", I have the issue with both CocoaPods and Swift Packages.
Currently, I set this parameter and I have the issue only with a Swift Package (SocketIO)
  • Having exactly the same issue: only for swift version, SocketIO dependency. How did you resolve it?

Add a Comment
Having the same issue with one of our own swift packages. Works fine on intel Macs. Does not work on apple silicon Macs.

In my case, I have added test target after the pod init, install etc.. And I saw, adding test target block in podfile solved my problem.

Example;

target 'SampleProject' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for SampleProject

  target 'SampleProjectTests' do
    inherit! :search_paths
    # Pods for testing
  end
end