My app would work on emulation and device with Xcode, and ionic view, but not with ionic emulation or device run. Then I added
<allow-navigation href="*"/>
to config.xml
and it worked on all these platforms. Allowing navigation everywhere was not recommended (for security reasons I don't understand), so I was looking for something more specific and noticed ionic temporarily changed the content tag to
<content src="http://172.27.35.142:8100" original-src="index.html"/>
during emulation and device run. So I replaced the allow-navigation element with
<allow-navigation href="http://172.27.35.142:8100"/>
which works and presumably doesn't have security issues.
A bit of downside is that either content
element above keeps Xcode from running the app. Generally I prefer ionic for device and emulation testing, since it's easy to see $log and some system messages (which I don't see in Xcode, though maybe I need to be informed about how to better use Xcode). The Xcode console, however, displays messages the ionic doesn't, which can be invaluable on rare occasions. If I'm missing a way to see the Xcode console messages in an ionic run, someone please enlighten me.