react-native run-ios不运行:FrontBoard不知道应用程序?

swy*_*wyx 13 xcode ios react-native

react-native run-ios过去几天工作了,但今天随机决定停止工作:


The following commands produced analyzer issues:
    Analyze /Users/swyx/Desktop/webdev/fullstacksr/reactNativeExtensions/ActionExtensionExample3/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c
    Analyze /Users/swyx/Desktop/webdev/fullstacksr/reactNativeExtensions/ActionExtensionExample3/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c
(2 commands with analyzer issues)

Installing build/Build/Products/Debug-iphonesimulator/ActionExtensionExample3.app
An error was encountered processing the command (domain=IXErrorDomain, code=2):
Failed to set plugin placeholders for org.reactjs.native.example.ShareExtensionExampleswyx
Launching org.reactjs.native.example.ShareExtensionExampleswyx
org.reactjs.native.example.ShareExtensionExampleswyx: -1
An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "org.reactjs.native.example.ShareExtensionExampleswyx" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: NotFound ("Application "org.reactjs.native.example.ShareExtensionExampleswyx" is unknown to FrontBoard").
Run Code Online (Sandbox Code Playgroud)

可能的原因和解决方案:

  • 检查方案 - 这绝对是Ask on launch
  • 方案设置 - 我没有任何空设置可以不选中
  • 达到最大应用ID限制 - 此应用ID org.reactjs.native.example.ShareExtensionExampleswyx是我重复使用但我认为它不会导致此问题
  • 删除ios/build和重新编译
  • 重新启动我的模拟器和我的整个计算机
  • 编辑:是的我正在使用xcode 9

到目前为止,这些都没有奏效.有什么其他的想法可以尝试吗?

Moh*_*lil 25

尝试使用另一个模拟器,如果它工作,你需要从模拟器菜单重置你的模拟器

  1. 模拟器 - >重置内容和设置如果你有Xcode 9它将来自硬件 - >删除所有内容和设置
  2. 从Xcode菜单中清除产品 - >清理并运行您的项目


kau*_*hal 10

As mentioned by Gavin Owens on Github, I followed those steps and it worked.

Just delete ios/build from iOS directory and after that run command react-native-run-ios

使用以下命令

rm -rf ios / build然后运行react-native run-ios