how to stop after "cordova run ios"
Asked Answered
B

10

9

What is the command to stop running after using cordova run ios in terminal?

I found one topic about this with 1 answer saying it's quit but that didn't work. Right now I close terminal every time which is very time consuming.

If i press ctrl+c I get the following:

(lldb) ^CTraceback (most recent call last): File "/private/tmp/fruitstrap_.py", line 17, in connect_command event = lldb.SBEvent() File "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/Python/lldb/init.py", line 3395, in init this = _lldb.new_SBEvent(*args) KeyboardInterrupt error: the platform is not currently connected Executing commands in '/tmp/fruitstrap-lldb-prep-cmds-'. (lldb) platform select remote-ios --sysroot '/Users/doekewartena/Library/Developer/Xcode/iOS DeviceSupport/7.1.2 (11D257)/Symbols' Platform: remote-ios Connected: no SDK Path: "/Users/doekewartena/Library/Developer/Xcode/iOS DeviceSupport/7.1.2 (11D257)/Symbols" (lldb) target create "/Users/doekewartena/Documents/jbc2014/platforms/ios/build/device/JBC2014.app" Current executable set to '/Users/doekewartena/Documents/jbc2014/platforms/ios/build/device/JBC2014.app' (armv7). (lldb) script fruitstrap_device_app="/private/var/mobile/Applications/E23498AF-29C5-4A9F-8AFB-6566631DB725/JBC2014.app" (lldb) script fruitstrap_connect_url="connect://127.0.0.1:12345" (lldb) command script import "/tmp/fruitstrap_.py" (lldb)
command script add -f fruitstrap_.connect_command connect (lldb)
command script add -s asynchronous -f fruitstrap_.run_command run (lldb) command script add -s asynchronous -f fruitstrap_.autoexit_command autoexit (lldb) connect (lldb)
run

Beaux answered 4/8, 2014 at 15:34 Comment(0)
M
4

Xcode shouldn't be running if you are building your project using cordova cli. This will most likely solve your problem.

Monoacid answered 2/9, 2014 at 18:5 Comment(0)
E
8

It is probably because of an earlier version of ios-deploy, as it is described here.

Check your version of ios-deploy, mine was 1.0.8:

$ ios-deploy --version

Check npm version of ios-deploy, current is 1.1.0:

$ npm info ios-deploy version

Update ios-deploy via npm:

$ sudo npm update -g ios-deploy

After $ cordova run you can now type exit and press ENTER. After this, type y and press ENTER to exit the process.

Extranuclear answered 6/8, 2014 at 8:57 Comment(1)
thanks for the clear explanation but sadly it didn't work. My version was also 1.0.8 and now it's 1.1.0 but exit still doesn't do anything.Beaux
N
7

Having tried lots of different suggestions, the only thing that's worked for me is having another terminal window open, and when you're finished with the debugging run:

pkill lldb

That will close the app on the phone, and also return the original terminal window the command prompt neatly.

Nightjar answered 13/11, 2014 at 20:2 Comment(0)
M
4

Xcode shouldn't be running if you are building your project using cordova cli. This will most likely solve your problem.

Monoacid answered 2/9, 2014 at 18:5 Comment(0)
B
3

I enter "exit" and then press Y and hit enter. This works when it stops at lldb.

Brower answered 2/10, 2014 at 12:30 Comment(1)
Right solution... If you just press Ctrl-C, the session is aborted but the whole script crashes and you might have problems starting a new sessionOlibanum
C
1

If you use Ctrl-C after the debug phase but before it says (lldb) it will exit...

Caitiff answered 28/8, 2014 at 1:36 Comment(0)
G
0

Simply press CTRL+C (in most unix shells)

Goldwin answered 4/8, 2014 at 16:27 Comment(0)
V
0

I'm still finding this is an issue with Cordova 5.1.1 CLI.

I found pressing Ctrl+Z in the terminal window running lldb worked for me.

Variant answered 1/7, 2015 at 14:23 Comment(0)
R
0

In my case, that depends on the way I run the app.

If I run the app using phonegap run ios, I must press Ctrl + C; but if I run using cordova run ios, I can also exit typing quit or exit in lldb (after the app runs), and then press Y.

As a side note: When I exit pressing Ctrl + C, and then unplug my device and delete the app, after plug my device again lldb attempt to install the app again, without asking. That does not happen when I exit typing exit.

Ripping answered 19/1, 2016 at 21:29 Comment(0)
M
0

I had a similar problem when running ionic cordova run browser. pushing CTRL-C just killed the terminal process but server was running in the background.

My solution on the mac was to go to activity monitor and kill process called node.

Masthead answered 12/2, 2018 at 17:49 Comment(0)
M
-1

You can use Command + C if you're using terminal on Mac.

Mabellemable answered 20/2, 2017 at 18:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.