title: How to prevent load of meteor.local (when building ios app with phonegap)
body: <p>This is an extension of a question I asked <a href="https://stackoverflow.com/questions/28843616/using-meteor-app-on-ipad-that-was-deployed-to-remote-server-with-meteor-up-issu">here</a>, which went unanswered. I am attempting to use the Meteor app on my iPad that I'm hosting on my own remote server. The issue is that when I run the following command, the app builds successfully:</p>
  
  <pre><code>sudo meteor run ios-device --mobile-server=XXXX:XXXX
  </code></pre>
  
  <p>The problem begins when I click the build button in Xcode to deploy the app to my device. It seems to build everything OK and even load the data from my remote server. But after a few seconds, it reverts back to a local database/build. When I check the Xcode log, it says "Finished load of <a href="http://meteor.local/" rel="nofollow noreferrer">http://meteor.local/</a>" so it seems to be overwriting the remote data with new, local data. I'm not sure if I have something enabled that's causing Xcode to load a local database or if there's something that I have to turn off to prevent it from loading.</p>
  
  <p>UPDATE:</p>
  
  <p>I've resolved the issue using the suggestion from Jey DWork to apply the missing environment variables in the Meteor server startup.</p>
  
  <p>The ones I added were:</p>
  
  <pre><code>Meteor.absoluteUrl.defaultOptions.rootUrl
  process.env.ROOT_URL
  process.env.MOBILE_ROOT_URL 
  process.env.MOBILE_DDP_URL
  </code></pre>
  
  <p>Without setting these, the ROOT_URL seemed to be getting overwritten after the initial load. As these environment variables do not seem to be documented, I'm still going to search and see if there is a different solution to this issue (as it seems strange that the app would have to re-load itself multiple times before it's usable). For now though, this is a temporary solution.</p>