gpt4 book ai didi

ios - react-native log-ios 返回没有找到真实设备的设备

转载 作者:可可西里 更新时间:2023-11-01 03:20:18 25 4
gpt4 key购买 nike

我正在尝试从一个 js 文件运行 console.log 以便 iOS 应用程序 react native 。

在此之前,我曾尝试使用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.

最佳答案

以下对我有用(在 react native 0.68.2 上测试):

npm install -g ios-deploy
# Run on a connected device, e.g. Sadia's iPhone:
react-native run-ios --device "Sadia's iPhone"

关于ios - react-native log-ios 返回没有找到真实设备的设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53334469/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com