38
loading...
This website collects cookies to deliver better user experience
The following build commands failed:
CompileC /Users/[username]/Library/Developer/Xcode/DerivedData/reactNativeBoilerplate-atkaxzsfrfdlfocjvyvemwywinew/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-Folly.build/Object. Users/[username]/[folder-path]/ios/Pods/Flipper-Folly/folly/synchronization/DistributedMutex.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Rosetta is a dynamic binary translator developed by Apple Inc. for macOS, an application compatibility layer between different instruction set architectures. It gives developers and consumers a transition period in which to update their application software to run on newer hardware, by "translating" it to run on the different architecture.
Set Terminal App to use Rosetta
:.
Select the app in Finder. Applications/Utilities/Terminal (App terminals).
From the File menu in the menu bar, choose Get Info.
make checklist on: ( Open Using Rosetta ). See image below.Set Xcode to use Rosetta
:.
Select the Xcode app in Finder. Applications/Xcode (Xcode App).
From the File menu in the menu bar, choose Get Info.
make checklist on: ( Open Using Rosetta )Next, delete the necessary folders so that the build process can be successful and smooth.
If you use the old code of react native, or if you experience an error like what I said the first time above, then you can follow the next steps below. However, if you've just built react native init on your macbook M1, then that shouldn't be a problem and you should be able to build react native ios on your macbook smoothly.
The next step you have to do: Modify the Podfile in the iOS folder. your-project-dir/ios/Podfile. navigate to your react native project, and open it in the editor.
use_flipper!()
use_flipper!({ 'Flipper-Folly' => '2.5.3', 'Flipper' => '0.75.1', 'Flipper-RSocket' => '1.3.1' })
npx pod-install
npx react-native run-ios