DEV Community

Thomas Prezioso Jr.
Thomas Prezioso Jr.

Posted on

No Such Module Found (M1 Macbook Pro Solution)

Recently I have been working on a new project with my new M1 Macbook Pro. In this project I needed to use third party libraries such as FBSDKCoreKit (Facebook) so the user could sign in with their Facebook account. The problem I ran into was that no matter what I did the Cocoapods I loaded into my project would not run. Xcode would give me error messages such as "No such module found" or "module 'FBSDKCoreKit' not found".

After hours of googling and looking at Github issues on the topic, I found the solution. If you are running into this problem on a M1 Mac you need to open Xcode using Rosetta. What is Rosetta? Without getting too technical Rosetta allows the new M1 Mac's to run x86 architecture apps. For a deeper dive into Rosetta check out the link here. If you need to install Rosetta 2 on your M1 Mac click on this link here and follow the tutorial.

Now to fix this issue we need to go into our Finder > Applications > and right click (command ⌘ + click) on Xcode. Then we need to select "Get Info"

Once we have the "Get Info" window opened, we then need to click on "Open using Rosetta"

Now if we relaunch our Xcode and build our project we shouldn't see anymore errors like "Module not Found". I hope this helps save you some time and headaches.

Thanks for reading. Happy Coding!

Top comments (0)