Run and emulate ios with live reload not working in iOS9

I was having the same problems as everyone else. Was working fine when I added to the p.list file, then updated to El Capitan and everything was back to blank screen.

I FOUND A SOLUTION:
Go to Xcode and download the 8.4 version of iOS Simulator
XCode > Preferences > Downloads > select 8.4 simulator

Go to iOS Simulator
Hardware > Device > Manage Devices > remove the devices that use iOS9

I know its not the best solution, but it will do until they find a fix for this iOS9 Simulator issue

1 Like

Updated to El Capitan and now iOS9 doesn’t work anymore with services running on the local address…
And Ionic is also a service running on the local address.

You can find different cases on stackoverflow and apple forum where it comes down to not able to reach your own local computers services/IP

So one solution could be downgrading the iOS version as suggested by outfitpic till this is fixed.
But a work around (not yet tested since i don’t know if it is possible) could be running Ionic from a different (internal) host.
This is also the reason why Seeni suggested in this topic VPN was working for him.
Because you are connecting to Ionic from a different IP than your own local IP.

To be clear, it is not related to the App Transport Security, and yes you also need to enable this but it will NOT solve connecting to your simulator’s local IP address.

Also, when installing iOS 8.4 you could run into another issue with El Capitan (Failed to install) you can find a solution here.

Hope this helps people who are also searching the Web in frustration :smile:

Also, could someone open a Bug report at Apple?
I currently do not own (myself) a dev account @ Apple.

1 Like

This works, thanks! Alternatively to deleting iOS9 devices, just select Hardware > Devices > iOS 8.4 then tap to launch the app.

It’s working for me as well rather than updating Info.plist file. No need to delete any emulator, but I wonder if it is possible to set a default device/iOS version to emulate or set the right device/iOS version when emulating with livereload.

So far, listing the devices in my system (OSX 10.10.5) I get:

iPhone-4s, 8.4
iPhone-4s, 9.1
iPhone-5, 8.4
iPhone-5, 9.1
iPhone-5s, 8.4
iPhone-5s, 9.1
iPhone-6, 8.4
iPhone-6, 9.1
iPhone-6-Plus, 8.4
iPhone-6-Plus, 9.1
iPad-2, 8.4
iPad-2, 9.1
iPad-Retina, 8.4
iPad-Retina, 9.1
iPad-Air, 8.4
iPad-Air, 9.1
iPhone-6s, 9.1
iPhone-6s-Plus, 9.1
iPad-Air-2, 9.1
iPad-Pro, 9.1
Apple-TV-1080p, tvOS 9.0
Apple-Watch-38mm, watchOS 2.0

But, if in fact I can successfully run ionic emulate -l -c --target='iPhone-5s' --debug ios, then changing from 9.1 to 8.4 emulator iOS version, running ionic emulate -l -c --target='iPhone-5s, 8.4' --debug ios outs:

(...)
Running command: /Users/telekosmos/DevOps/phonegap/lodashdb/platforms/ios/cordova/run --emulator --debug "--target=iPhone-5s, 8.4"
iPhone-5s, 8.4 is not a valid target for emulator
Error: /Users/telekosmos/DevOps/phonegap/lodashdb/platforms/ios/cordova/run: Command failed with exit code 2
    at ChildProcess.whenDone (/Users/telekosmos/.nvm/versions/node/v0.12.7/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
(...)

Any chance to set the version along with the device?

Cheers!

Check out the issue here, there may be a way to get Cordova to use the full list from ios-sim showdevicetypes: https://github.com/driftyco/ionic-cli/issues/317

For anyone still interested, this has been fixed in the newest Cordova iOS platform release (3.9.2).

http://cordova.apache.org/announcements/2015/11/02/cordova-ios-3-9-2.html
https://issues.apache.org/jira/browse/CB-9046

This did not work I updated my ios as instructed in the link the splash page is still going round and round and app is not coming up :frowning:

Ah sorry, I was specifically referencing @telekosmos/@outfitpic’s posts that I replied to before regarding specifying the device OS.

Same here, I’m having this kind of issue.
So I’ve stopped using for a while.

Ok, I got it working with a combination of all answers :smile:

npm install -g cordova
cd my_project
cordova platform update ios@3.9.2

Then
go to xcode 7.1 ->Preferences ->download -> download iOS 8.4 Simulator

Then I did not remove any simulator from Simulator ->HArdware ->Device-> Manage Devices
However, I gave the following command a try

ionic emulate -l -c --target=‘iPhone-5s, 8.4’ --debug ios

It worked perfectly fine. and to test that I change my source code and changes got reflected in the simulator live reload :slight_smile:

I know its kind of weird it did not work for @telekosmos :wink:

3 Likes

try

ionic run ios -l -c --address localhost

5 Likes

Works like a charm, thanks

Was this ever fixed?

what is fixed? I still cannot start an 8.4 version like :
ionic run ios --target “iPhone-5, 8.4” on El Capitan.
localhost as address does not work either (without other mod), nor does :
ionic emulate -l -c --target=‘iPhone-5s, 8.4’ --debug ios
that gives me:
No target specified for emulator. Deploying to iPhone-6s-Plus, 9.2 simulator

I hope there will be a structural fix in the future, for now I will debug on Android, which nicely shows console output in the terminal and responds to restart commands at least once :slightly_smiling:

still not working for me I’m getting crazy of this shit.

I’ve been running into the same issue and for me adding the following to my config.xml file fixed the problem for using live reload on the emulator (still hangs when using live reload on an actual device though):

<access origin="*" />
<allow-intent href="*" />
<allow-navigation href="*" />
8 Likes

Nowhere in the documentation does it say to add the plugin to config.xml:

This very much worked for me for emulate. *high five8

While this would definitely work, all you really need to do is whitelist your dev server. It’s most likely localhost, but it could be different so run ionic run --livereload and it’ll show you something like this:

Setup Live Reload
Running live reload server: http://10.1.10.10:35729
Watching: 0=www/**/*, 1=!www/lib/**/*
Running dev server:  http://10.1.10.10:8100

Whitelist your dev server by adding

<allow-navigation href="*://10.1.10.10*"/>

to config.xml and livereload should work.

1 Like

Thanks you save my life.