"No active iOS device found" 尝试访问模拟器日志时

"No active iOS device found" when trying to access simulator logs

不知何故,当我 运行 npm run log:ios (react-native log-ios) 时,出现以下错误:

No active iOS device found

我已启动模拟器,运行 应用已打开。
知道为什么,或者我怎样才能开始调查这个问题?

PS: 我最近安装了 Xcode 9.1-beta2,因为我想检查从这次升级继承的东西。不确定它 would/could 在这种情况下扮演了什么角色。

issue with react-native log-ios has not been resolved yet due to some other priorities. There is a simple workaround using Console.app。要打开 Console.app + space > 输入 console,按回车键。

模拟器日志也可以在Debug>Open System Log

下看到

编辑:如果您想在 iOS 模拟器

中查看 console.log 进行调试

打开Safari,进入首选项->高级->菜单栏中的Show Develop menu。完成后,在 Xcode 中构建和 运行,然后在 safari 中转到 Develop -> iPhone Simulator -> Your App Name.