title: Error Failed to install CocoaPods dependencies for ios project. React Native
body: <p>I have a macbook pro m1 and I am getting the above error when trying npx react-native init. I have followed the react native documentation for environment set up. I tried to install pod via brew, however, still the same error. What is the issue? I see a lot of people having the same issue, but there is no clear explanation or solution for it? Please help</p>
  <p>✔ Processing template
  ✖ Installing CocoaPods dependencies (this may take a few minutes)
  ✖ Installing CocoaPods dependencies (this may take a few minutes)
  error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
  Please try again manually: &quot;cd ./test/ios &amp;&amp; pod install&quot;.
  CocoaPods documentation: <a href="https://cocoapods.org/" rel="nofollow noreferrer">https://cocoapods.org/</a></p>
  <p>[NOTE]
  You may have encountered a bug in the Ruby interpreter or extension libraries.
  Bug reports are welcome.
  For details: <a href="https://www.ruby-lang.org/bugreport.html" rel="nofollow noreferrer">https://www.ruby-lang.org/bugreport.html</a></p>
  <p>[IMPORTANT]
  Don't forget to include the Crash Report log file under
  DiagnosticReports directory in bug reports.</p>
  <p>when I tried to run ios:</p>
  <p>BUILD FAILED **</p>
  <p>The following build commands failed:
  CompileC /Users/patrickbelan/Library/Developer/Xcode/DerivedData/test-gqoaknolitrwejedppjzybscmama/Build/Intermediates.noindex/test.build/Debug-iphonesimulator/test.build/Objects-normal/arm64/main.o /Users/patrickbelan/Desktop/react/test/ios/test/main.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'test' from project 'test')
  CompileC /Users/patrickbelan/Library/Developer/Xcode/DerivedData/test-gqoaknolitrwejedppjzybscmama/Build/Intermediates.noindex/test.build/Debug-iphonesimulator/test.build/Objects-normal/arm64/AppDelegate.o /Users/patrickbelan/Desktop/react/test/ios/test/AppDelegate.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'test' from project 'test')
  (2 failures)</p>