1

I am developing a NativeScript app (i.e. a native app compiled from web languages) and deploying it to XCode (7.2) emulator.

NativeScript uses the Xcode command line tools internally.

I am working under OS X 10.11 (El Captain) and I tried to deploy my app to iPhone 5 and iPhone6 emulators.

The issue I'm getting is that my app can't reach REST APIs (get/post/....). I'm deploying my APIs using json-server.

On Linux with json-server + run to Android emulator it works perfectly so I'm pretty sure it doesn't depend on json-server or my app code.

I tried an old solution posted at: iPhone simulator cannot connect to internet

Specifically, I've reset simulator settings as well as enabling 'HTTP services' in settings. The issue is still there. Any clue?

MRizwan33
  • 2,723
  • 6
  • 31
  • 42
dragonmnl
  • 14,578
  • 33
  • 84
  • 129
  • 1
    More importantly, which iOS version are you working on? Don't tell me you forgot to add network exceptions for iOS 9... – Raptor Jan 26 '16 at 02:19
  • @Raptor as I said I'm pretty new to iOS development. Target version is 8 to support cocoapods, running version in Simulator is 9 – dragonmnl Jan 26 '16 at 12:05

1 Answers1

1

Check this out. I might have something to do with Apple's Application Transport Security jargon.

Community
  • 1
  • 1
Mike Resoli
  • 1,005
  • 3
  • 14
  • 37
  • thanks. I'll try asap and then I'll accept the answer. even though it will be a pain... since I need to override plist settings as I'm using nativescript which compiles to native but still is to an upper abstraction level – dragonmnl Jan 26 '16 at 21:52
  • Did you give this a shot? – Mike Resoli Jan 28 '16 at 09:23
  • I will do it today or tomorrow at the latest (focusing on Android now). the question tab is there ready to be accepted (but I bet it will work if I manage to override plist settings ) :) – dragonmnl Jan 28 '16 at 11:30