XCode simulator: how to make Internet work for apps? - xcode

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?

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

Related

Flutter migration from Windows to Mac

I have developed a Flutter Mobile application on Windows 10 environment. I am using Firebase with services like Firestore, push notifications, storage and Authentication.
I have not done anything for IOS so far. I am planning to have a Mac machine in cloud and start the IOS related changes there. I have below questions.
I want to have my code at both the places synced so that I can work on windows and Mac. Is there any way to do that securely?
What editor I should use on Mac for IOS and Android development?
Also what are the other things I need to take care?
Thank you in Advance
for syncing:
git, period! Flutter will take care of the rest
for IDE:
we swear by Intellij as you will need it if you decide to port an android version of your app. With Intellij you can even sync plugins & IDE settings across multiple PCs

Worklight 6.2.0.1 issue with xCode 7.3.1 on iOS9+

I have two applications developed on WL 6.2.0.1. And I was building my iOS projects using xCode 6.3.1 as I wasn't facing any issues on iOS (All OS versions)
When I upgraded my xCode to 7.3.1. all my iOS projects that are running on iPhone/iPad with iOS9+ starts to fail and it not even connecting to my WL server anymore.
Any invocation I make it failed and I see no logs on the server, meaning it is not even reaching it.
If I tested the same build that is done on xCode 7.3.1 but with iOS8 it works.
When I revert back my xCode update as I have a time machine, all start working again on All OS versions.
Is there a known issue with WL 6.2.0.1 with new xCode? I have been searching and couldn't find anything about this.
Server version: 6.2.0.01.20141013-1735
Starting with Xcode 7 and iOS 9, Apple now requires ATS (Application Transport Security) by enabling TLS 1.2 on the server and working with HTTPS on the client. That is why all your requests are failing - because the client & server are misconfigured.
During development, you can disable ATS. See here: https://mobilefirstplatform.ibmcloud.com/blog/2015/09/09/ats-and-bitcode-in-ios9/
For production-time, you'll want to read this: https://mobilefirstplatform.ibmcloud.com/blog/2015/09/07/preparing-ibm-mobilefirst-platform-server-app-transport-security-ios-9/

Xcode 6 Beta iOS 8 Simulator can't access internet

Just installed XCode 6 Beta to test my app. The iOS 8 Simulator runs and my app successfully installs but the simulator can't access the internet. I try using safari or maps and there is no network connection. If I run the iOS 7 simulator from XCode 6, it connects to the internet perfectly.
I've tried using the steps in this thread but it didn't change anything. (The steps were more if your app doesn't install but I tried anyway.)
I don't have a firewall or little snitch blocking the simulator.
Any other pointers?
I had the same problem. Try to quit the iOS simulator, and then re-build and launch your application. It should work.
I saw a lot of posts about re-starting the simulator, resetting the simulator settings, etc. I ended up re-installing X-Code, updating to X-Code 6.1, etc, etc. Still didn't have a connection to the network!
What ended up being the solution is I turned off my antivirus (TrendMicro). I had checked all the anti-virus settings before and didn't see any "block process connection". When I turned the whole thing off it solved the problem though.
I had same error with xCode 6.1 and iOS 8 simulator. What worked for me is I went to settings>developer> and switch on "Allow HTTP Services" option.
Same problem for avast security on mac, turning of webshield under avast preferences solved it.
Xcode version 7.3.1, ios simulator 8.4
Turning off AVAST resolve all errors.
I've had the exact same issue. It's bizare but plugging my Macbook in via an ethernet cable seemed to resolve this. I know it's not perfect but it works.
I also use XCode 6.1 GM and git the same issue. My scenario was that during development I connected my MacBook to another WLAN. My Macbook was connected to the internet, but the iOS Simulator not. My solution was to just close the iOS simulator and redeploy the app from xcode.
Just simply reset the simulator. Quit and Re-run your app your problem will be gone. It works for me.
I had a similar scenario with Mac OS X 10.9.5, Xcode 6.2, Cordova 4.3, iOS 8.3 - Everything worked fine on all platforms except ajax/network access was limited on the IOS simulator.
As suggested by by others, going into the Settings on the IOS emulator and changing "Allow HTTP Services" in the developer submenu opened up all network access and ajax queries/processes came to life.
So try that first!
The source control I used is Git. So upon resetting all my local changes and getting the latest solved my problem.
So First thing I would do is Stash all your local changes if you need them.
Then reset all your local changes and get the latest
Now run the tests.
This worked for me. Hopefully works for you as well.

iOS simulator for windows 7 to test websites

I'm a UI Developer and I want to get an iOS simulator to test my work as I found later that some features don't work on iphone/ipad and the included custom fonts don't work as well.
Thanks in advance.
You can only use ios Simulator when you have an Xcode running on Intel based Mac Computer. I found this link interesting, i am not sure whether this works or not. http://www.makeuseof.com/tag/ipadian-ios-simulator-windows/
I recommend running virtual box with a MacOSX install then as mentioned previously, open the contents of the XCODE directory and there is an iOS Simulator there.

Phonegap stuck at detecting iOS SDK environment

i'm trying to create my first app using Phone Gap, so i manage to Build a "generic" app, after installing node.js and phonegap.
So i'm trying to run the following command on the terminal:
phonegap build ios
And it always get stucked on [phonegap] Detecting iOS SDk Environment.
I have, xCode 5, and i do have all the profiles needed to develop, and distribute for iOS, in fact i couple of hours ago, i just send my first app to Itunes Connect, so i think my environment, is fine.
Any ideas? Thanks for the attention!
So, instead of using the command phonegap build ios, I tried phonegap run ios. The program runs, and also a folder was created with the xCode files.
I still dont know what was wrong, but it worked for me.

Resources