[Resolved] - Run emulator for ios


#1

After the new Mac Os X version and iOs 9, I try to launch my application with emulator with line command:
ionic emulate ios -lc
The emulator launch the app but it stay locked on the splash screen with spine loading. What could I do to pass this and try my app?


#2

I’m also seeing this on iOS9 and xCode7.

-lcs gives no logs/errors.

I’m able to build the app and run it from xCode without issue, though. Have you tried that?


#3

I ran into the same thing. My app was working fine, I installed XCode 7 and my app would only show the splash screen. I uninstalled XCode 7 and reinstalled XCode 6.4 and i’m able to work again.


#4

Yeah, same is happening for me. Guess I’ll revert my xcode back as well.


#5

Thanks for your answers. I think I’ll revert my xcode back as well too to be able to work again with console logs


#6

To run iOs emulator with log console, you must modify your App-Info.plist file with adding lines:
NSAppTransportSecurity

NSAllowsArbitraryLoads

and then it’s succeed.

Great!


#7

Could you please elaborate? Adding those lines to my app-Info.plist didn’t resolve the issue. Does it need a string value?


#8

I added those lines 2 times, the first time didn’t work. First, I ran the build command for iOs, then I added those lines. After I restart the command and it worked.


#9

you just added them like this?

  <key>NSAppTransportSecurity</key>
  <string></string>
  <key>NSAllowsArbitraryLoads</key>
  <string></string>

#10

No I added those lines:

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>

#11

It works for me :)… thanks


#12

Elaborating on the answers already given (viz. adding NSAllowsArbitraryLoads to your .plist file) I’ve created a before_emulate hook that automatically adds the setting for you.

See https://www.bram.us/2015/09/29/ionic-emulate-vs-xcode-7/ for more details.