Meteor / Cordova / Phonegap iOS app not working when deployed to production

I am trying to launch an iOS Meteor / Cordova / Phonegap app. I am following the documentation provided here: https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration

To keep things simple, I'm just testing the Leaders Meteor Project. When I follow the steps in the link above, I can run the application without issue in the iOS simulator and directly on the device using xcode using any of the following commands:

meteor run ios

or

meteor run ios-device --mobile port 10.0.1.2:3000 -p 10.0.1.2:3000

To test the production environment, I deployed the application directly to meteor.com

meteor deploy [my-app-name]

Following the build instructions, I specify the host and port of my remote server in the build command:

meteor build ../ buildfolder -p [my-app-name] .meteor.com: 80

When I run the application through the generated xcode project (in the simulator), when I start the application, I see nothing but a blank white screen. There are no errors in the xcode logger, but this is what the result looks like:

16:01:41.583 [CDVTimer][file] 6.641030ms
16:01:41.607 [CDVTimer][statusbar] 23.925006ms
16:01:41.607 [CDVTimer][TotalPluginStartup] 30.839026ms
16:01:41.709 Resetting plugins due to page load.
16:01:41.739 Finished load of: (snip)
16:01:41.791 Starting the server on port 40539
16:01:41.792 Setting document root: <snip>
16:01:41.792 Started httpd on port 40539
16:01:41:792 staffutility[49019:607] HTTPServer: Started HTTP server on port 40539
16:01:41.792 addresses: {
    "en1/ipv4" = "10.0.1.12";
    "en1/ipv6" = "fe80::7ec3:a1ff:fea4:49c5";
    "lo0/ipv4" = "127.0.0.1";
    "lo0/ipv6" = "fe80::1";
    "vboxnet0/ipv4" = "192.168.56.1";
}
16:01:41.794 Resetting plugins due to page load.

      

Note. ... I've also tested deploying a meteor project with Meteor Up: https://github.com/arunoda/meteor-up on my own EC2 with exactly the same results. The iOS app just sits there with a blank white screen. (Hitting the url through the browser works fine)

What idea might you come up with?

+3


source to share


3 answers


It looks like after the update in meteor 0.9.4 (which apparently includes improved Cordova / Phonegap support) my problem has been resolved.



0


source


Not enough reputation to comment, so please post a response.

Had the same problem, but the only way to get it to work is to manually change the host port: in Xcode. Once built, open the project in xcode, go to> www> index.html.

In the next block, removing the port number made the application work again.



__meteor_runtime_config__ = {"meteorRelease":"METEOR@0.9.3.1",
"ROOT_URL":"http://[my-app-name].meteor.com",
"ROOT_URL_PATH_PREFIX":"",
"DDP_DEFAULT_CONNECTION_URL":"http://[my-app-name].meteor.com",
"autoupdateVersionCordova":"426a072de258af04658e2585485c277b8aac18a3"};

      

I don't quite understand why, but I tried to check the port number of my application on console.logging after deploying to meteor.com. The port number seems to be random after deployment. I'm looking forward to seeing someone shed more light on deployment without including the port number.

+2


source


go to your home directory (NOT your application directory)

$HOME/ rm -rf.meteor

      

Run the application

+2


source







All Articles