0

I have deleted my project on Xcode may it be .xcworkspace or .xcodeproj.

Because of that, I had to delete IOS and android folders while downgrading, updating and re-upgrading my react version to re-install IOS and android folders.

Thanks to that the emulator is working but unfortunately the project isn't present in the emulator and is still absent with Xcode. One thing to point out is that the simulator only appears when ran in the integrated terminal and nor in general terminal after cd-ing in the project folder.

Can anyone please help re-integrating the project in the emulator and on Xcode, please.

Here is the error when the emulator is running in a general terminal:

Here is the error when the emulator is running in a general terminal:

error Command failed: xcrun instruments -s
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk' (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH

Here is the error for building the project within emulator when ran from VS code integrated terminal:

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening project.xcodeproj
Cœur
  • 37,241
  • 25
  • 195
  • 267
Camille Basbous
  • 299
  • 5
  • 11
  • 34

1 Answers1

0

The process you need to follow is so similar to renaming a react native app. Basically you just need to run react-native upgrade in your root project directory. For further info you can check another question here. The instructions below explains how to create another react native project based on a copied one with a new name.

  • First copy the directory which your to-be-name-changed application exists. And go to your newly cloned directory.
  • Change the name at index.ios/android.js file which is given as a parameter to AppRegistry.
  • Change the name and version accordingly on package.json
  • Delete /ios and /android folders which are remaining from your older app.
  • Run $react-native upgrade to generate /ios and /android folders again.
  • Run $react-native link for any native dependency.
  • Finally run $react-native run-ios or anything you want.

Courtesy of

https://stackoverflow.com/questions/42506068/how-can-i-regenerate-ios-folder-in-react-native-project
Eyal Abadi
  • 69
  • 1
  • 9
  • It's not in my trash I completely removed it by mistake. So I had to delete ios and android folder downgrade, update and re-upgrade my react version to re-install IOS and Android folder but my project still does not exist with Xcode and isn't present on the IOS simulator. I hope that helps if you have any specific questions please feel free asking – Camille Basbous May 20 '19 at 02:37
  • Do you have more simple steps? – Mustafa Al-Salhi Mar 28 '23 at 23:34