0

I am using Mac M1, and when I am trying to do npm run ios but getting the below error. No solutions found on the internet solved my issue :( please help

The following build commands failed:
        Ld /Users/fullmad/Library/Developer/Xcode/DerivedData/SagaReserve-hdvaajmlsndpidftnfyqfuxydjqw/Build/Products/Debug-iphonesimulator/SagaReserve.app/SagaReserve normal (in target 'SagaReserve' from project 'SagaReserve')
(1 failure)

This is what is everything in the console: https://pastebin.com/gaCEJRJx

Haren Sarma
  • 2,267
  • 6
  • 43
  • 72

1 Answers1

0

I'm using Macbook Pro on M1 for React Native development too. Had some issues with arm64 architecture too.

Here is what helped me:

FIRST: Exclude arm64 architecture from builds:

  1. Open your ios/*project_name*.xcworkspace in xcode.
  2. Choose your project in the left side of the xcode.
  3. Go to Build Settings
  4. In tabs (Basic/Customized/All) choose All
  5. Search for 'Excluded'
  6. Set all Excluded Architectures to arm64 XCode build settings

SECOND: Set XCode to use Rosetta

  1. Go to the Applications folder in Finder
  2. Find XCode
  3. Open application menu and select Get info
  4. Select Open using Rosetta Xcode with Rosetta

Hope it helps you too. Best of luck!

Wito Divaro
  • 129
  • 1
  • 6
  • Hello @WitoDivaro, I'm still getting the above mentioned error after doing the required steps described by you – sahil555 Nov 25 '21 at 07:10