Issues emulating ios

Oh, I thought ionic-cli was calling cordova emulate iOS --family !

Sorry! :smile:

Whatā€™s a ā€œtmux sessionā€?

@mhartington - is or will there be a solution for this provided by Ionic or do we have to wait for a Cordova fix?

@brentr http://tmux.sourceforge.net/

Thanks for the link and I am definitely not running that and still getting the errors.

@brentr Perhaps I should be a bit more clear. I have not found a way to make the warnings disappear or to make the emulator work flawlessly. However, if I open the emulator first (by opening xCode and then opening the emulator from the menu) and then run the ionic emulate command, it will still show the errors but the application loads in the emulator as expected without timing out. If I am inside of a tmux session, however, it times out regardless, thus my original comment regarding tmux.

No matter what, I still see the errors. It seems, as has been pointed out, that this is a Cordova problem and will hopefully be fixed soon. But, you should still be able to continue development by ignoring the errors and opening the emulator manually prior to running the ionic emulate command.

As an aside, for anyone who wishes to continue to use tmux, you can do so by following the instructions in the Tmux section of the ios-sim README: https://github.com/phonegap/ios-sim

@jmcclellan Thanks for clearing that up and that makes sense.

So do you (or anyone else) know if those errors effect the build (rendered output)?

You can use ios-sim start to start de simulator too(without opening xcode).

@bentr - No, the errors donā€™t appear to be affecting the build or rendered output.

This maybe something that the cordova people will have to take care of. The two warnings are from platforms/ios/cordova/emulate, where device type and family still use the old format. This just needs to be update.

I am also having this issue. has anyone tried contacting cordova yet? when I try to launch the app from terminal it just goes to a black screen.

I found that I was getting my black screen because of a java error after I fixed the error I still do get the same cordova error when I emulate to ios however my app is now launching.

I have tried all the approaches suggested above, but unfortunately none of them worked for me. But Iā€™m still glad and grateful for all these inputs, and feel that Iā€™m not alone in this. >_<

Eventually I took an odd route, I went to click directly on /platforms/ios/cordova/emulate (in Finder), interestingly, that finally deploy and launch the app in my simulator. It still gives me the same warnings though, and I still build in command line, just couldnā€™t launch from it.

Hope a proper solution will be found soon!

Update: I no longer need to use the odd route I posted above after I upgraded my OS to Yosemite. I still get the warnings, but I could use the simulator more easily now.

@team: Any update on this issue? Is there any ticket on cordova which has been raised?
Was very curious and desperate to try cordova + ionic + angularjs hands on and iā€™m badly stuck at this.

None of the above hacks working for me. Any more quick fixes / solutions to get rid of this issue?

Thanks,
noddycha

Interestingly, the odd route is the only one that worked for me (Iā€™m on Yosemite as well)

Same here! I tried different version of everything (except for Xcode) and can only get it to work by going to the emulate file in Finder. Will update if I figure it out.

had the same issue. Then realised I was running the commands from inside a tmux session. This seems to be the reason for cordova not being able to communicate with the iOS simulator. When I tried to run the command directly from a terminal, it worked just fine.

@mhartington, thanks for your suggestion. it is works for me. First time when i run ionic emulate i got the above issue. Since now my simulator is already open, the next time when I run ionic emulate works for me.

Awesome.
Note that the cordova cli has been updated recently so Iā€™d suggest updating their CLI to the latest to make sure things are all good.

Iā€™ve tried everything in this thread and still no go. Thank you all for all the input and help thus far.

  • Uninstalled and reinstalled ios-sim, cordova, ionic. All latest versions.
  • ios-sim start works fine and my simulator is up and running when I try to run either ios emulate ios or cordova emulate ios and still nothing. Just times out and gives me the same error my emulator doesnā€™t change state (stays on home screen).
  • Tried directly running the emulate command under /platforms/ios/cordova/emulate and still nothing
  • not running tmux, just running it in straight terminal

Current versions:

  • ionic==1.2.8
  • cordova==3.5.0-0.2.6
  • ios-sim==3.0.0

Anyone come up with another solution? Canā€™t seem to figure this one out.