How to Fix React Native iOS Build Issues on M1 Mac

I own an M1 Macbook pro and is used for my software development purpose. Even though building react native Android app is flawless I always face issues while building iOS apps. This blog post is about common react native iOS build problems and solutions for M1 Mac users.

Pod Install Failure

The failure of the pod install command is a common problem while creating a new react native project. The solution for this is already given in the official react native documentation.

As you see, execute the following command in your project folder.

sudo arch -x86_64 gem install ffi

Then run the following command in the ios folder.

arch -x86_64 pod install

Issues related to Outdated Xcode

You will also face iOS build issues when the Xcode on your Mac is outdated.

The solution to such problems is to keep the Xcode updated. Once the Xcode is updated, you can try rebuilding the project.

Issues related to Folder Structure

My iOS build issues didn’t stop there. I also faced build issues similar to this. The culprit of such issues was my folder structure. My folder structure was like React Native – Projects – MyProject. The space between the name of a folder can cause build issues. In my case, the parent folder name was React Native. I replaced the folder name from React Native to React_Native.

Rebuilding my react native project after changing the folder name was successful.

Similar Posts

Leave a Reply