4

I've been stuck on this one on two projects now! (silly me didn't write down how I solved this issue the first time around ‍♂️.) I have a react native project and running yarn ios brings me this error

Ld /Users/myname/Library/Developer/Xcode/DerivedData/appname-hash/Build/Products/Debug-iphonesimulator/appname.app/appname normal (in target 'appname' from project 'appname')

I've tried in random orders (if I need to be doing these in specific orders please let me know)

  • deleting DerivedData/appnamefolder
  • cleaning xcode build folder
  • deleting and re-installing pods
  • deleting, cleaning yarn cache, and reinstalling node-modules via yarn.

I'm running out of ideas and all articles I've read seem to only point to the above solutions which are not working for me.

Environment

  • Mac(Intel)Monterey 12.0.1
  • React Native 0.64.2
  • NPM@8.3.0 (global)
  • xCode 13.1

Any help is greatly appreciated!

Thank you!

  • Hi, were you able to solve this issue? – mintaras May 19 '22 at 09:05
  • Hi there, yeah I was. – Brett Saxon May 26 '22 at 01:29
  • 1
    I basically deleted pods, pods.lock, node modules, yarn.lock, went to About This Mac->Storage->Developer and deleted the Project Build Data and Indexes, cleaned cache in Xcode just for good measure. cleaned cache with yarn/npm, cleaned pod cache. JIC. then in this order I.... installed node modules, re-installed pods, then it worked for me. ‍♂️ I've run into a couple more times with the PHP script and it usually has to do with the pods not being in sync with node modules, or if you add a new dependency, etc. make sure to pod install. – Brett Saxon May 26 '22 at 01:32
  • hi, i tried what is described in the post above am also facing this issue. did u try anything other then this? – Sufyan Salim Apr 04 '23 at 20:53
  • 1
    could you write the commands and in steps which worked. Thanks – Sufyan Salim Apr 04 '23 at 21:01
  • @BrettSaxon I am also facing the exact same issue. I also forgot how I resolved it earlier. Can you please break down your solution explanations into commands? – Muhammad Aqeel Apr 06 '23 at 22:39
  • @MuhammadAqeel - this is the order from above here. I basically deleted pods, pods.lock, node modules, yarn.lock, went to About This Mac->Storage->Developer and deleted the Project Build Data and Indexes, cleaned cache in Xcode just for good measure. cleaned cache with yarn/npm, cleaned pod cache. JIC. then in this order I.... installed node modules, re-installed pods, then it worked for me. ‍♂️ I've run into a couple more times with the PHP script and it usually has to do with the pods not being in sync with node modules, or if you add a new dependency, etc. – Brett Saxon Apr 07 '23 at 16:08
  • Also there are new issues with XCode 14.3. if you're running RN < 0.69.9 you'll need to revert to Xcode 14.2. or upgrade your project. Issue here -> https://github.com/facebook/react-native/issues/36739 – Brett Saxon Apr 07 '23 at 16:15

1 Answers1

0

In my own case, I was getting this error

Ld /Users/user/Library/Developer/Xcode/DerivedData/AppName-***/Build/Products/Debug-iphonesimulator/AppName.app/AppName normal (in target 'AppName' from project 'AppName')
(1 failure)(1 failure)

The steps mentioned by the author above worked for me

  1. Delete your pods: cd ios and run rm -rf pods && rm podfile.lock and then cd ../ (back to root folder)

  2. delete your yarn.lock or npm.lock and node_modules folder: run rm -rf node_modules && rm yarn.lock

  3. Delete Project Build Data and Indexes and XCode cache: go to system preferences and search for storage. Click on storage settings, Click on Developer and delete Project Build Data and Indexes and XCode cache

    enter image description here

  1. Clear your caches

clear pods cache

    rm -rf "${HOME}/Library/Caches/CocoaPods"
    rm -rf "`pwd`/Pods/"
    pod update

clear npm/ yarn cache

npm cache clean --force 
yarn cache clean
  1. re-install all in the order - node_modules, and pods
  • in your root folder run yarn install or npm install
  • then cd ios and run pod install
halfer
  • 19,824
  • 17
  • 99
  • 186
Kenshinman
  • 679
  • 8
  • 20