2

I am trying to build an archive of my iOS app, but the following linker error occurs:

Apple Mach-O Linker (ld) Error Group clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have several Pod and react-native dependencies. and am able to build the app for running on both a simulator and a physical device.

How do I resolve this issue?

LinusGeffarth
  • 27,197
  • 29
  • 120
  • 174
adambene
  • 1,143
  • 9
  • 16

3 Answers3

0

I removed then re-added some of the 3rd party React Native dependencies to the project and linked libraries also and now it builds.

adambene
  • 1,143
  • 9
  • 16
0

In case, if anyone is having this issue during archiving only, go to project > pod > targets. You will see React in the list, delete the React, clean the project, and then try archiving. Hope it will work. Most of the times it happens during archiving and throws warning of duplicate. By deleting the React from the pod fix the problem.

Julfikar
  • 1,353
  • 2
  • 18
  • 35
0

Delete node_modules folder and yarn.lock file

npm install Or yarn install

run

react-native link

finally run

react-native run-ios 

this worked for me.

Hope so it will help someone

Muhammad Ashfaq
  • 2,359
  • 5
  • 20
  • 46