react-native不能运行ios设备 [英] react-native cant run ios device
本文介绍了react-native不能运行ios设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试在ios真实设备上运行react-native应用程序.它在模拟器或使用xcode的设备上运行良好,但我想在命令行中运行我尝试了这个:
I try to run react-native app on a ios real device. It works well on simulator or on a device using xcode but I would like to run with command-line I tried this :
>npm install -g ios-deploy
>react-native run-ios --device "My iPhone"
这就是我得到的:
info Found Xcode workspace "Project.xcworkspace"
info Building (using "xcodebuild -workspace Project.xcworkspace -configuration Debug -scheme Project -destination id=00008020-0001395426EA002E")
......................................................................
2020-04-06 11:15:02.836 xcodebuild[16724:402803] DTDeviceKit: deviceType from 00008020-0001395426EA002E was NULL
2020-04-06 11:15:02.967 xcodebuild[16724:402797] DTDeviceKit: deviceType from 00008020-0001395426EA002E was NULL
info Installing and launching your app on My iPhone
该应用程序出现在我的iPhone中,但没有运行.
The app appears in my iPhone but doesnt run.
地铁在新的终端上停下来,但我只能得到这个:
Metro oppens in a new terminal but I get only this :
###### ######
### #### #### ###
## ### ### ##
## #### ##
## #### ##
## ## ## ##
## ### ### ##
## ######################## ##
###### ### ### ######
### ## ## ## ## ###
### ## ### #### ### ## ###
## #### ######## #### ##
## ### ########## ### ##
## #### ######## #### ##
### ## ### #### ### ## ###
### ## ## ## ## ###
###### ### ### ######
## ######################## ##
## ### ### ##
## ## ## ##
## #### ##
## #### ##
## ### ### ##
### #### #### ###
###### ######
Welcome to React Native!
Learn once, write anywhere
To reload the app press "r"
To open developer menu press "d"
而且我没有使用XCode构建时显示的进度条.
And I doesnt get the progress bar that shows on build with XCode.
编辑
对于日志:
user@MBP Project % react-native log-ios
error No active iOS device found
已安装的版本:
user@MBP Project % react-native -v
react-native-cli: 2.0.1
react-native: 0.62.0
推荐答案
enter code here in terminal
react-native run-ios --simulator="iPhone 11 Pro Max"
这篇关于react-native不能运行ios设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文