繁体   English   中英

在iOS模拟器或Xcode项目上找不到React本机项目

[英]Can't find React native project on iOS Simulator or Xcode project

我在Xcode上删除了我的项目,可能是.xcworkspace.xcodeproj

因此,我不得不删除IOS和android文件夹,同时降级,更新和重新升级我的反应版本以重新安装IOS和android文件夹。

由于模拟器正在运行,但不幸的是,该模型中没有该项目,并且Xcode仍然没有。 需要指出的一点是,模拟器仅在集成终端中运行时才会出现,而在项目文件夹中进行cd-ing后也不会出现在通用终端中。

任何人都可以请帮助重新整合项目在模拟器和Xcode上。

以下是仿真器在通用终端中运行时的错误:

以下是仿真器在通用终端中运行时的错误:

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

以下是从VS代码集成终端运行时在模拟器中构建项目的错误:

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

您需要遵循的过程与重命名本机应用程序非常相似。 基本上,您只需在根项目目录中运行react-native upgrade 有关详细信息,您可以在此处查看其他问题。 下面的说明解释了如何基于具有新名称的复制项目创建另一个反应本机项目。

  • 首先复制您的名称更改的应用程序所在的目录。 然后转到新克隆的目录。
  • 更改index.ios/android.js文件中的名称, index.ios/android.js文件作为参数提供给AppRegistry。
  • package.json相应地更改名称和版本
  • 删除旧应用程序中剩余的/ios/android文件夹。
  • 运行$react-native upgrade再次生成/ios/android文件夹。
  • 为任何本机依赖项运行$react-native link
  • 最后运行$react-native run-ios或任何你想要的东西。

礼貌

https://stackoverflow.com/questions/42506068/how-can-i-regenerate-ios-folder-in-react-native-project

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM