Xcode 12.0.1 "No such module"

After updating to Xcode 12.0.1 I can't build my projects anymore. Each time I do I get "No such module..." for each Pod. I haven't made any other changes to the project. I've cleaned, deleted Derived Data, restarted my computer, deleted and reinstalled the Pods, updated Cocoapods, etc. Has anyone else had this issue?

Replies

Update: I can run on my device but not on a simulator
  • Any solution to this?

  • most of the framework project using pods , can't run in simulator its also work with .workspace

Add a Comment
Hi! I have the same problem, I can build the project for generic IOS, but when I choose a simulator (Simulator 12.0) it keep saying no such module for each Pod. Has anyone found the solution?
Hi! I have the same problem too. I can build for real device but not for simulator :(
Did anyone found a solution or is this just another xcode bug?
Solved:

I'm not sure what exactly fixed the issue but I updated a bunch of settings. There were some Xcode warnings recommending updating project settings that auto-updated a variety of settings. I also updated the project format of each target to Xcode 12-compatible and updated the target build version to iOS 13. I also updated to Xcode 12.1 (though this alone did not fix the problem).
This still appears to be an issue in Version 12.2 (12B45b).

Works on a device, fails for the simulator.

With a simple new iOS App project I was able to use the Cocoapods and run on the simulator, but my "real" project fails to compile with this error.

For anyone who comes across this post in future, using the "Excluded Architectures" Target Build Setting workaround, as detailed here, fixed my issue.
I have face same problem. Please help me.
Any updates on this issue? I am experiencing the same and it's driving me nuts...
Post not yet marked as solved Up vote reply of r85 Down vote reply of r85
I'm using M1 chip. My solution is open Xcode with Rosetta
Hey, try this out:
Go to Product > Schemes > New Scheme...
Select the name of your Cocoapod then click OK.
After you do this, build the project (click cmd + B)

This worked for me.
  • it worked for me, thanks a lot!

  • It worked also for me.

  • worked for me on xcode 13! Thanks!

I have the same problem where I received the error "No module found" when ran on simulator, but works fine on mobile device.

I solved by removing arm64e from Main Project > Build Settings > User-Defined > VALID_ARCH, leaving only arm64.
  • I activated my account just to say thanks. This worked for me after so much research. Cheers

  • Thank you for this. This also worked for me. Even though everything in my Podfile was installed successfully, but my project was also telling me "no such module" when I tried to import them. In my case, arm64 was in one of the subsections under Build Settings > Architecture. I deleted it (arm64), the error message "No such module" disappeared, and I was able to run the simulator!

  • Thanks, also worked for me!

    Alternative method (worked for XCode 12.4): Add arm64 under Excluded Architectures. Build Settings > Architectures > Excluded Architectures > Debug > Select "Any iOS Simulator SDK" > fill in "arm64" as the value. Do the same for Release.

    Equivalent line of code: "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;

Add a Comment

Had the same problem on Xcode 12.2 and 12.5 / M1. Pod installed successfully but kept getting the "no such module" error on the simulator, and I could only run on my phone. I removed arm64 in one of the subsections under Build Settings > Architecture, and it worked!

@yujeonglee I could not find anywhere to remove arm64

This solution work like a charm for me. I had new mac book pro with M1 chip.

Are you using an Macbook M1? Or an Intel Macbook? If you are using an Intel macbook ...

  • $sudo gem install cocoapods
  • move to your folder run pod init
  • open your Podfile and add your targets

Close Podfile type pod install type pod update Open MyPod.xcworkspace and start working

if you are using M1 Mb do the same but start with Right click on Terminal

  • Get Info -> Open with Rosetta
  • Open terminal and type sudo gem install ffi
  • Then do the steps above.
  • no, tu respuesta es la mas estupida que leí...

Add a Comment

Using Xcode Version 13.1 (13A1030d), tried installing Alamofire via cocoapod and no luck, wouldn't build, tried running clean build, adding Alamofire as a scheme, etc. Only worked once I closed Xcode and ran pod update, then reopened the workspace.

Just resolved it on Xcode 13.1 My PodFile had to be like below in order to get it working.

workspace '<NAME>'

platform :ios, '15.1'

target '<NAME>' do
 use_frameworks!
  
 pod 'AppAuth'
  
 target '<NAME>Tests' do
  inherit! :search_paths
 end
  
 target '<NAME>UITests' do
  #inherit :search_paths
 end
  
end```