【问题标题】:react-native log-ios returning no device found for real devicereact-native log-ios 返回未找到真实设备的设备
【发布时间】:2019-04-19 10:36:40
【问题描述】:

我正在尝试从 js 文件运行 console.log 以使 iOS 应用程序反应原生。

在此之前,我曾尝试使用 react native 的调试功能“Shake Device”,但未能成功。

现在我正在尝试通过react-native log-ios 运行命令行调试控制台。它适用于模拟器,但不适用于真实设备,它给了我这个错误:

No active iOS device found
(node:26724) UnhandledPromiseRejectionWarning: undefined
(node:26724) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:26724) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

【问题讨论】:

    标签: ios react-native react-native-ios


    【解决方案1】:

    在物理设备上运行您的应用时,您应该能够在 Xcode 中看到您的日志,如下所示:

    1. 在 Xcode 中打开您的项目
    2. 使用 Xcode 在您的设备上构建和运行
    3. 您会在右下角的窗口中看到日志

    【讨论】:

      猜你喜欢
      • 2020-12-20
      • 1970-01-01
      • 1970-01-01
      • 2020-11-08
      • 2022-06-13
      • 2018-09-09
      • 2016-02-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多