-
-
Save miromasat/993b754bdeb6fd6d67cd to your computer and use it in GitHub Desktop.
#!/bin/bash | |
# Manually emulate ionic/cordova application | |
# Miroslav Masat 2014 | |
echo "Emulating..." | |
cd ./platforms/ios/build/emulator | |
var=$(pwd) | |
ios-sim launch "$var"/*.app |
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
It's work for me, too. Really solved my emulate failed problem.
Thanks
It's works really well. Thanks so much.
Yeap, for me too. Thanks a lot. 😄
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.
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
ionic/cordova emulate ios gets nothing on the simulator, but this tips works !
thank you ......
Thanks, this worked like a charm :)
Thank you very much indeed .! That works for me as well.
Worked, Thanks!
usage:
setup application the standard way
$ ionic start myApp tabs
$ cd myApp
$ ionic platform add ios
$ ionic build ios
Then create a file called emulate.sh in that directory and copy the content of this gist into it. Next you have to set permissions for this shell script.
$ sudo chmod 777 emulate.sh
After that, each time you want to emulate your application in iOS simulator, just run: ./emulate.sh
I hope this works for you. Enjoy!