React native project deleted on xcode, can't run “run-ios react-native”

空扰寡人 提交于 2019-12-11 14:04:23

问题


I've deleted my React native project while trying to make Google maps work on Xcode being .xcodeproje and .xcworkspace. Which means I am unable to run IOS simulator.

I've tried deleting Xcode and reinstalling but it doesn't find the react native project on Xcode. Tried linking the files and creating another project but no result. It gives the error below when I try building the simulator. The files that were in the deleted file are in my VS Codde within the ios file.

react-native run-ios --simulator="iPhone7"
error Could not find Xcode project files in "ios" folder. Run CLI with --verbose flag for more details.

回答1:


Upgrade your react-native project to restore your deleted files.

1 - Delete your ios and android folder

2 - In your project directory:

react-native upgrade

3 - link for any native dependency:

react-native link

4 - And after that:

react-native run-ios


来源:https://stackoverflow.com/questions/56194342/react-native-project-deleted-on-xcode-cant-run-run-ios-react-native

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!