Skip to content

Instantly share code, notes, and snippets.

@miromasat
Created October 31, 2014 15:34
Show Gist options
  • Select an option

  • Save miromasat/993b754bdeb6fd6d67cd to your computer and use it in GitHub Desktop.

Select an option

Save miromasat/993b754bdeb6fd6d67cd to your computer and use it in GitHub Desktop.
This was an only solution for debugging Ionic apps for me.
#!/bin/bash
# Manually emulate ionic/cordova application
# Miroslav Masat 2014
echo "Emulating..."
cd ./platforms/ios/build/emulator
var=$(pwd)
ios-sim launch "$var"/*.app
@snehoo

snehoo commented Nov 25, 2014

Copy link
Copy Markdown

Cool, this works great, now how do i change device type, changing that doesnt reload the app, what changes are required in the script for it to open in multiple device types?

Thanks

@dpi627

dpi627 commented Dec 25, 2014

Copy link
Copy Markdown

It's work for me, too. Really solved my emulate failed problem.

Thanks

@shunkurosaki

Copy link
Copy Markdown

It's works really well. Thanks so much.

@apostoiis

Copy link
Copy Markdown

Yeap, for me too. Thanks a lot. 😄

@Chener

Chener commented Feb 13, 2015

Copy link
Copy Markdown

Why this did not work for me, it showed:

Emulating...
Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=2 "Simulator session timed out." UserInfo=0x7fcf80408180 {NSLocalizedDescription=Simulator session timed out.}

I tried sudo.

@chmartinez

Copy link
Copy Markdown

Same error as @Chener.
Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=2 "Simulator session timed out." UserInfo=0x7ff8c8c75ab0 {NSLocalizedDescription=Simulator session timed out.}

iOS sim version 8.1 (550.3)
Update: I was able to solve my problem. It was a permission error. I'd created an ionic project using sudo and cause an issue with the files that the simulator was trying to execute (check last response at http://forum.ionicframework.com/t/simulator-session-timed-out-when-ran-ionic-emulate-ios/11437/4). Hope it helps

@dfang

dfang commented Mar 17, 2015

Copy link
Copy Markdown

ionic/cordova emulate ios gets nothing on the simulator, but this tips works !

thank you ......

@marcfalk

Copy link
Copy Markdown

Thanks, this worked like a charm :)

@yakupkeskindag

Copy link
Copy Markdown

Thank you very much indeed .! That works for me as well.

@vib3oh

vib3oh commented Apr 14, 2015

Copy link
Copy Markdown

Worked, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment