For anyone who has worked on or works on React Native, there's no denying that iOS setup, development, and distribution is FAR FAR FAR more difficult than that of Android.
The situation kinda takes a turn for worse with the new CPU architecture, viz. M1 that Apple rolled out a year or two back. There's no denying that M1 is no less than a tech marvel and we don't expect anything less from Apple; but you sure wanna yell out a couple of words out loud to an architecture that just refuses to run a couple of basic commands that used to run as smooth as butter previously.
The most common issue that pops up with this new architecture is the very simple command we execute known as:
You can expect all pods to be installed without any hiccups but the pods that cause an issue in their installation are:
Let's tackle these issues one by one.
Installing pods for boost results in an error similar to =>
In short, the error states that it could not place an authorised request to
jfrog.io and is crashing with a 401 unauthorised request. The solution to this couldn't be simpler. Just execute the following command and you're golden:
cd ios && rm -rf Pods && rm -rf Podfile.lock && rm -rf build && pod deintegrate && cd ..
Once you have done this, pod install should move past installation of boost and then hang up on
PS: You might run into many solutions asking you to install the ffi gem and execute a command like
sudo arch -x86_64 gem install ffi
You may give it a whirl but it definitely fails (at least it did for us saying that the architecture specified is invalid) so there's no absolute guarantees that this would most certainly work.
Pod installation for glog mostly crashes with an error that looks something like:
error: C compiler cannot create executables.
Once again, the solution is pretty simple. This time instead of one though, we wanna execute 2 commands:
sudo xcode-select --switch /Applications/Xcode.app cd ios && pod install
Here's one to hoping this article proves helpful for you :D
If you are facing any other issues or if the aforementioned solutions don't seem to pan out for you, feel free to drop the same in the comments down so we may take it forward.