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

时间:2017-09-23 21:10:57

标签: ios xcode 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").

调查的可能原因和解决方案:

  • Checking the scheme - 绝对是Ask on launch
  • Scheme settings - 我没有任何空白设置可以保持未选中状态
  • 达到最大应用ID限制 - 此应用ID org.reactjs.native.example.ShareExtensionExampleswyx是我正在重复使用但我不认为会导致此问题
  • 删除ios/build并重新编译
  • 重新启动我的模拟器和我的整台计算机
  • 编辑:是的我正在使用xcode 9
到目前为止,这些都没有奏效。有什么其他的想法可以尝试吗?

2 个答案:

答案 0 :(得分:20)

尝试使用其他模拟器,如果它可以,您需要从模拟器菜单重置您的模拟器

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

答案 1 :(得分:6)

正如加文·欧文斯(Gavin Owens)在Github上提到的那样,我按照这些步骤进行了工作。

只需从iOS目录中删除 ios / build,然后运行命令react-native-run-ios

使用以下命令

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