# Issues emulating ios

**URL:** <https://forum.ionicframework.com/t/issues-emulating-ios/9772>\
**Category:** ionic-v1\
**Created:** [September 16, 2014, 6:29pm UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772 "2014-09-16T18:29:54Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jstaud](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@Jstaud](https://forum.ionicframework.com/u/Jstaud)\
**Post date:** [September 16, 2014, 6:29pm UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/1 "2014-09-16T18:29:54Z")

</div>

When following the instructions to build and then emulate ios on OSX Yosemite, I get the following error in red text:

\*\* BUILD SUCCEEDED \*\*

2014-09-16 09:58:44.963 ios-sim[1561:25856] stderrPath: /Users/Jstaud/myApp/platforms/ios/cordova/console.log  
2014-09-16 09:58:44.963 ios-sim[1561:25856] stdoutPath: /Users/Jstaud/myApp/platforms/ios/cordova/console.log

then this error follows in red text:

Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=2 “Simulator session timed out.” UserInfo=0x7fa44d010430 {NSLocalizedDescription=Simulator session timed out.}  
Error: /Users/Jstaud/myApp/platforms/ios/cordova/run: Command failed with exit code 1  
at ChildProcess.whenDone (/usr/local/lib/node\_modules/cordova/node\_modules/cordova-lib/src/cordova/superspawn.js:135:23)  
at ChildProcess.EventEmitter.emit (events.js:98:17)  
at maybeClose (child\_process.js:743:16)  
at Process.ChildProcess.\_handle.onexit (child\_process.js:810:5)

Any help on this issue would be great.

I should mention that I’m using Xcode 6 GM.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [September 17, 2014, 4:28pm UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/2 "2014-09-17T16:28:49Z")

</div>

Hmm, I’m getting this error during my local testing. I’m thinking this is something that is related to cordova. Seems that cordova is not yet updated with the new version of xcode

---

<div class="post-metadata">

**Author:** ![Jstaud](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@Jstaud](https://forum.ionicframework.com/u/Jstaud)\
**Post date:** [September 18, 2014, 6:01pm UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/3 "2014-09-18T18:01:15Z")

</div>

At one point I was able to get it to work as long as I opened the built project in xcode then run it from within xcode, but it is fairly buggy and doesn’t always work.

---

<div class="post-metadata">

**Author:** ![xephorus](https://avatars.discourse-cdn.com/v4/letter/x/e9bcb4/32.png) [@xephorus](https://forum.ionicframework.com/u/xephorus)\
**Post date:** [September 23, 2014, 7:09am UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/4 "2014-09-23T07:09:15Z")

</div>

I have a variation of this issue using Mavericks and Xcode 6. It seems as though the latest ios-sim no longer accepts how ionic is trying to launch the emulator? Any thoughts on how to circumvent this?

**_Note the first 2 lines:_**

Usage of ‘–family’ is deprecated in 3.x. Use --devicetypeid instead.  
Usage of ‘–retina’ is deprecated in 3.x. Use --devicetypeid instead.

Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=2 “Simulator session timed out.” UserInfo=0x7fce5af342e0 {NSLocalizedDescription=Simulator session timed out.}  
Error: /users/p/web/test/platforms/ios/cordova/run: Command failed with exit code 1  
at ChildProcess.whenDone (/usr/local/lib/node\_modules/cordova/node\_modules/cordova-lib/src/cordova/superspawn.js:135:23)  
at ChildProcess.emit (events.js:98:17)  
at maybeClose (child\_process.js:756:16)  
at Process.ChildProcess.\_handle.onexit (child\_process.js:823:5)

---

<div class="post-metadata">

**Author:** ![Jstaud](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@Jstaud](https://forum.ionicframework.com/u/Jstaud)\
**Post date:** [September 23, 2014, 12:44pm UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/5 "2014-09-23T12:44:26Z")

</div>

I think mhartington is right. If you look at the file path where the error is, it’s Cordova that is buggy. If we could patch those files it would probably work.

---

<div class="post-metadata">

**Author:** ![daniklic](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@daniklic](https://forum.ionicframework.com/u/daniklic)\
**Post date:** [September 29, 2014, 11:34pm UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/6 "2014-09-29T23:34:42Z")

</div>

Encountering the same issue described here. I have ios-sim 3.0.0, cordova 3.6.3-0.2.13 and xcode 6.0.1.

---

<div class="post-metadata">

**Author:** ![ami](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@ami](https://forum.ionicframework.com/u/ami)\
**Post date:** [October 6, 2014, 5:44pm UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/7 "2014-10-06T17:44:38Z")

</div>

I am also facing same issue. I have update everything Xcode, Cordova, npm, ionic. Still can’t solve this. If anyone has solved this, please post solution.

---

<div class="post-metadata">

**Author:** ![benallfree](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/benallfree/32/66392_2.png) [@benallfree](https://forum.ionicframework.com/u/benallfree)\
**Post date:** [October 7, 2014, 12:26am UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/8 "2014-10-07T00:26:48Z")

</div>

I’d be willing to help test. Same problem.

[https://gist.github.com/benallfree/d527d9f2a09e142f8ffa](https://gist.github.com/benallfree/d527d9f2a09e142f8ffa)

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [October 7, 2014, 4:28pm UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/9 "2014-10-07T16:28:20Z")

</div>

Can you guys give this a shot?

```bash
pkill lldb

```

There could be some process still running in the background.

If that doesn’t work, please try uninstalling ios-sim and then add it back. I’ve talked to another user that did that and said it solved the problem

---

<div class="post-metadata">

**Author:** ![benallfree](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/benallfree/32/66392_2.png) [@benallfree](https://forum.ionicframework.com/u/benallfree)\
**Post date:** [October 8, 2014, 3:15am UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/10 "2014-10-08T03:15:52Z")

</div>

> [@mhartington](#):
>
> pkill lldb

That didn’t do it for me, sorry ☹

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [October 8, 2014, 1:59pm UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/11 "2014-10-08T13:59:50Z")

</div>

Hmm… have you tried uninstalling ios-sim and the adding it back?

Can you run `cordova emulate ios` or `cordova run ios`?

---

<div class="post-metadata">

**Author:** ![benallfree](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/benallfree/32/66392_2.png) [@benallfree](https://forum.ionicframework.com/u/benallfree)\
**Post date:** [October 8, 2014, 2:01pm UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/12 "2014-10-08T14:01:42Z")

</div>

Actually I just tried again and I found the emulator running in under my windows. Apparently when the emulator launches, the window isn’t brought to the front.

So I think my system is working fine, sorry for the confusion. I wasn’t sure what to look for.

---

<div class="post-metadata">

**Author:** ![mlachmish](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@mlachmish](https://forum.ionicframework.com/u/mlachmish)\
**Post date:** [October 8, 2014, 9:22pm UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/13 "2014-10-08T21:22:27Z")

</div>

Hi, I’ve tried uninstalling, pkill and the cordova commands.  
None of them worked for me. I still get this error

* * *

Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=2 “Simulator session timed out.” UserInfo=0x7fd1d8f2a8c0 {NSLocalizedDescription=Simulator session timed out.}  
Error: /Users/mlachmis/Developer/shift/client/shiftApp/platforms/ios/cordova/run: Command failed with exit code 1  
at ChildProcess.whenDone (/usr/local/lib/node\_modules/cordova/node\_modules/cordova-lib/src/cordova/superspawn.js:135:23)  
at ChildProcess.emit (events.js:98:17)  
at maybeClose (child\_process.js:756:16)  
at Process.ChildProcess.\_handle.onexit (child\_process.js:823:5)

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [October 10, 2014, 1:29am UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/14 "2014-10-10T01:29:30Z")

</div>

I’ve gotten the error as well, but I believe that is on the ios-sim side of things. Seems that the simulator is taking a bit longer to boot up, and ios-sim has a timeout set if it can’t connect.

Until that is fixed, a quick solution is to start the simulator a head of time

---

<div class="post-metadata">

**Author:** ![jmcclellan](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jmcclellan](https://forum.ionicframework.com/u/jmcclellan)\
**Post date:** [October 10, 2014, 11:29am UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/15 "2014-10-10T11:29:33Z")

</div>

I also get this error. I’m trying the Getting Started for the first time so this is a bit disconcerting! None of the proposed solutions (including opening simulator first) work for me. ☹

\*\* BUILD SUCCEEDED \*\*

2014-10-10 07:24:08.552 ios-sim[43460:507] stderrPath: /Users/jason/dev/ionic/todo/platforms/ios/cordova/console.log  
2014-10-10 07:24:08.554 ios-sim[43460:507] stdoutPath: /Users/jason/dev/ionic/todo/platforms/ios/cordova/console.log  
Usage of ‘–family’ is deprecated in 3.x. Use --devicetypeid instead.  
Usage of ‘–retina’ is deprecated in 3.x. Use --devicetypeid instead.  
Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=2 “Simulator session timed out.” UserInfo=0x7f997a60e7c0 {NSLocalizedDescription=Simulator session timed out.}  
Error: /Users/jason/dev/ionic/todo/platforms/ios/cordova/run: Command failed with exit code 1  
at ChildProcess.whenDone (/usr/local/lib/node\_modules/cordova/node\_modules/cordova-lib/src/cordova/superspawn.js:135:23)  
at ChildProcess.emit (events.js:98:17)  
at maybeClose (child\_process.js:756:16)  
at Process.ChildProcess.\_handle.onexit (child\_process.js:823:5)

---

<div class="post-metadata">

**Author:** ![felipew](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/felipew/32/13128_2.png) [@felipew](https://forum.ionicframework.com/u/felipew)\
**Post date:** [October 10, 2014, 12:27pm UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/16 "2014-10-10T12:27:46Z")

</div>

I have the same issue here !

As pointed out by others opening the emulator first and then ionic emulate works!

Also:

```auto
Usage of '--family' is deprecated in 3.x. Use --devicetypeid instead.
Usage of '--retina' is deprecated in 3.x. Use --devicetypeid instead.

```

This isn`t called by ionic cli ?

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [October 10, 2014, 2:32pm UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/17 "2014-10-10T14:32:09Z")

</div>

Nope, this is actually called by cordova.

When you you run `ionic emulate ios`, you are essentially running `cordova emulate ios`

---

<div class="post-metadata">

**Author:** ![jmcclellan](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jmcclellan](https://forum.ionicframework.com/u/jmcclellan)\
**Post date:** [October 11, 2014, 9:34am UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/18 "2014-10-11T09:34:00Z")

</div>

So for anyone else having this issue and unable to get it to work even if you have ios simulator open already, make sure you’re not using Tmux. For some reason ios-simulator doesn’t like it if you’re inside a tmux session, which is how I generally do my day to day dev.

---

<div class="post-metadata">

**Author:** ![brentr](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/brentr/32/66597_2.png) [@brentr](https://forum.ionicframework.com/u/brentr)\
**Post date:** [October 11, 2014, 7:33pm UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/19 "2014-10-11T19:33:07Z")

</div>

I am also experiencing the same issue even when the iOS simulator is already running.

```
Usage of '--family' is deprecated in 3.x. Use --devicetypeid instead.
Usage of '--retina' is deprecated in 3.x. Use --devicetypeid instead.
```

---

<div class="post-metadata">

**Author:** ![forkloop](https://avatars.discourse-cdn.com/v4/letter/f/a183cd/32.png) [@forkloop](https://forum.ionicframework.com/u/forkloop)\
**Post date:** [October 12, 2014, 1:15am UTC](https://forum.ionicframework.com/t/issues-emulating-ios/9772/20 "2014-10-12T01:15:14Z")

</div>

Yep, this fixed my problem.

[Next page](https://forum.ionicframework.com/t/issues-emulating-ios/9772.md?page=2)
