Mobile app doesn't connect to server and getting blank screen


Hi All,

I’m new to mobile app development. I’ve developed mobile app using Meteor+Ionic2 with the following sample application:

When i run the application locally both browser and iOS app connecting to localhost works just fine. Now in the stage to get it deployed to a server. We got NodeJS server configured by my company’s admin team.

I’ve used the following build command to build the artifacts

meteor build /Users/myuesr/localfolder/ --architecture os.linux.x86_64 --server

i’ve also tried using the following command without the application name:

meteor build /Users/myuesr/localfolder/ --architecture os.linux.x86_64 --server

After the tar.gz file deployment to the server, the application works just fine when accessed using mobile/computer browsers. Here is the browser URL i am trying:

But when the iOS project generated by the build command gets deployed to the iOS/Android device, i’m getting only the blank screen. it shows localhost when trying to do remote debugging using Safari browser. It shows localhost in the menu option when navigated to Develop -> My iPhone Name -> localhost.

The config.xml in the generated XCode project has got the following:

<description>New Meteor Mobile App</description>
<author email="n/a" href="n/a">A Meteor Developer</author>
<content src="http://localhost:12664/" />
<allow-intent href="tel:*" />
<allow-intent href="geo:*" />
<allow-intent href="mailto:*" />
<allow-intent href="sms:*" />
<allow-intent href="market:*" />
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<allow-navigation href="http://localhost" />
<access origin="*://" />
<icon height="120" src="resources/iphone_2x.icon.png" width="120" />

When i deploy the iOS app using Xcode project generated by build script, it connects to localhost and works fine as it connects to localhost. It stops working as soon as the local server is stopped.

After generating the deployable file for iOS and installed it to iPhone using my company’s apps store, Safari’s Develop menu still shows the local host and i am getting the following error in the safari browser remote debug console:

XMLHttpRequest cannot load Cross-origin redirection denied by Cross-Origin Resource Sharing policy.

I’m not sure what is going wrong here.

We are nearing our project deadline and i spent last 2 days to fix this issue. Any help is very much appreciated.



I am still trying to fix this issue since last 3 days. Please help if possible.


It seems to be something to do with SSL as app is able to connect with http. When connected using https i’m still getting the following error:

Failed to load resource: The network connection was lost.

It would be great if someone can help on this.