cordova run ios --device不能将应用程序启动到设备上。

10

我已经为Cordova 5.0进行了配置,并开始在iOS应用程序中使用。成功地在模拟器上创建和运行应用程序。对于设备,我正在使用Xcode启动应用程序。 ios-deploy -c:的结果

[....] Waiting for iOS device to be connected
[....] Found iPad 2 'Ipad' (DeviceID) connected through USB.
[....] Found (null) connected through USB.

使用命令启动设备时

cordova run ios --device

成功构建应用程序并显示

** BUILD SUCCEEDED **

[....] Waiting for iOS device to be connected
[....] Found iPad 2 'IPad' (deivceId) connected through USB.
run

无法在设备上安装应用程序。 我还尝试过cordova run ios --target="Ipad"cordova run ios --device --target="Ipad"也不起作用。

此外,对于ios-deploy,我的iPhone不可见,返回Found (null) connected through USB. iPad版本:7.x,iPhone版本:8.x,ios-deploy版本:1.6.0


你的Xcode是否显示设备已连接?或者你是否选择了设备来启动应用程序?同时阅读有关在设备上启动应用程序的文档:https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/LaunchingYourApponDevices/LaunchingYourApponDevices.html -- 它有非常好的解释。 - Nehil Mistry
我能够从Xcode在设备上启动应用程序。 - Gobi M
这是我在Cordova文档中找到的内容 - http://cordova.apache.org/docs/en/3.3.0/guide_platforms_ios_index.md.html - Nehil Mistry
1个回答

2
在终端中运行以下命令(在cordova应用程序文件夹上):
找到并替换 YOUR_APP_NAME_BUNDLE 为您的应用程序名称,在此路径上:
ios-deploy --bundle "platforms/ios/build/device/YOUR_APP_NAME_BUNDLE.ipa"

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接