Meteor test/deploy iOS app to connect with real server (not localhost)

Viewed 310

I have a meteor application that I have been testing on an iOS phone. I deployed the application originally with the following (based on this guide):

meteor install-sdk ios    
meteor add-platform ios
meteor run ios

meteor run ios-device

However, this is just using a local version, hosted on http://localhost:3000. So I have been reading about how to deploy to a specific server, examining a number of different instruction sites about the topic. From this it seems that I should simply run the following, where http://example.com is the server location:

meteor run ios-device --mobile-server http://example.com

However, the application is still running on the local server. In the config.xml there are the two following lines next to each other:

<access origin="http://meteor.local/*"/>
<access origin="*://example.com/*"/>

so I tried deleting <access origin="http://meteor.local/*"/>, but that didn't fix it.

I then added the following to the root of my meteor project in a file named mobile-config.js, based on this example,

App.info({
  name: 'Example',
  description: 'An iOS app built with Meteor',
  version: '0.0.1',
  author: 'Me',
  website: 'http://example.com/'
});

App.icons({
  // iOS
  'iphone': 'resources/icons/icon-60.png',
  'iphone_2x': 'resources/icons/icon-60@2x.png',
  'ipad': 'resources/icons/icon-76.png',
  'ipad_2x': 'resources/icons/icon-76@2x.png'
});

App.launchScreens({
  // iOS
  'iphone': 'resources/splash/Default~iphone.png',
  'iphone_2x': 'resources/splash/Default~iphone.png',
  'iphone5': 'resources/splash/Default-568h@2x~iphone.png',
  'ipad_portrait': 'resources/splash/Default-Portrait~ipad.png',
  'ipad_portrait_2x': 'resources/splash/Default-Portrait~ipad.png',
  'ipad_landscape': 'resources/splash/Default-Landscape~ipad.png',
  'ipad_landscape_2x': 'resources/splash/Default-Landscape@2x~ipad.png'
});

App.accessRule('example.com/*')

The application compiles, but its still running on localhost. Also, the app icon and spash screen are the meteor defaults, not my custom icons/splash screens (which are in the root folder in resources/econs/...png and resources/splash/...png, so perhaps the compiling process is ignoring everything that is in mobile-config.js?

So the question boils down to "How can I run this iOS application using the live server?"

1 Answers
Related