[
https://issues.apache.org/jira/browse/CB-12118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15645882#comment-15645882
]
Shazron Abdullah edited comment on CB-12118 at 11/8/16 12:10 AM:
-----------------------------------------------------------------
Problem here is, when this is run: "cordova run ios", since no flags are set,
it defaults to building for emulator (thus implicitly it runs "cordova build
ios") and does not build for device. It then runs "cordova run ios" with the
implicit "--nobuild" flag, since it already built it, and fails because it
tries to run for device.
The 'run' command has a check whether at least a device is connected, that's
why it tries to run to device instead (when no flags are set). Unfortunately
this logic is in 'run', but not 'build'. The fix is to either add this logic in
build, or remove it in run (so running to device needs to be explicit always).
was (Author: shazron):
Problem here is, when this is run: "cordova run ios", since no flags are set,
it defaults to building for emulator (thus implicitly it runs "cordova build
ios") and does not build for device. It then runs "cordova run ios" with the
implicit "--nobuild" flag, since it already built it, and fails because it
tries o run for device.
The 'run' command has a check whether at least a device is connected, that's
why it tries to run to device instead (when no flags are set). Unfortunately
this logic is in 'run', but not 'build'. The fix is to either add this logic in
build, or remove it in run (so running to device needs to be explicit always).
> Cordova run ios does not automatically deploy to device
> -------------------------------------------------------
>
> Key: CB-12118
> URL: https://issues.apache.org/jira/browse/CB-12118
> Project: Apache Cordova
> Issue Type: Bug
> Components: CLI, iOS
> Affects Versions: [email protected], [email protected]
> Environment: running cordova on macOS Sierra 10.12.1 on MacBook Pro
> with Cordova Cli 6.4.0 and cordova ios 4.3.0 XCode 8.1 npm 6.9.1 ios-deploy
> 1.9.0
> Reporter: Brandon Yoxtheimer
> Fix For: [email protected]
>
>
> In the current project I am working when running cordova run ios command with
> an iphone connected to my mac via usb cable the app does not run
> automatically on the device that is connected. It instead throws an error
> 2016-11-05 22:42:28.595 ios-deploy[13652:464976] [ !! ] Can't access app path
> '/Users/brandonyoxtheimer/runiostest/platforms/ios/build/device/HelloCordova.app'
> : No such file or directory
> Error: Error code 253 for command: ios-deploy with args:
> --justlaunch,--no-wifi,-d,-b,/Users/brandonyoxtheimer/runiostest/platforms/ios/build/device/HelloCordova.app
>
> if i run cordova run ios --device it does deploy to the device. So it appears
> there is an issue where cordova is checking whether there is a device and
> building the app into the device directory under platforms/ios/build
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]