Ember seems not to work on phonegap build app


I’m currently having a problem with a phonegap build app I’m developing. When I upload the project with Phonegap Build tool and downlad it with my Galaxy Nexus (Android 4.2), I think ember is not loading routes, controllers either models and application doesn’t start. Why this can be happening?

Any sugestion?. Thaks a lot.


I think you need to give us more information about what you’ve tried. When you upload your package to PG Build, does a hello world index.html work even before you load up Ember? Now if you alert something in the JavaScript on that page, does that work? If you run your app with Ember on a local web server and not on a phone, does that work? If you deploy to your phone using Eclipse and not using PG Build, does that work?


I played around with Ember.js and phonegap and it worked fine. Here is a repo of my playground phonegap application: https://github.com/makepanic/phonegap-test

Unfortunately the javascript source is compressed in the public repo. It has no build errors on build.phonegap and works on iOS and Android.


Hi yoshuki, thanks for replying.

My app project contains the index.html file required by Phonegap Build. I can run the app in a desktop browser and simulate it with Ripple (the phonegap simulation tool on chrome), in this context all is working fine, but when I upload the project in build.phonegap.com and download it with my phone it only show an alternative text “Splash screen goes here” defined in index.html body tag. It means that application is running on the phone, but isn’t loading Ember features.


Hi rndm.

I downloaded your project and upload it to my phonegap build account in order to test it in my phone. It works fine!!, reviewing your code, I didn’t understand the use of Ember.js in your project, I think you are using Mootols mobile framework (Moobile) and not Ember MVC model. If I’m wrong please let me know. I will be thankful if you can give some basic explanation of Ember.js use in this example.

I’m interested in using Ember’s MVC model and EmberData to build my app because it considers almost all of my development needs in a very easy way. Greetings


[Resolved] After reviewing my code, I noted that javascript libraries references (jquery, jquery mobile, ember) were linking to Internet resources, and for a reason that I don’t know yet (permissions perhaps), the compiled mobile app in my phone was not taking that references correctly and it couldn’t find them. I downloaded those libraries and put them in a local folder in order to reference them locally, and voila! The app worked OK. I think I needed to specify some permissions in app configuration to use libraries on the Internet. Thanks for your replies!. =)


But don’t you want your app to work even without an internet connection? Anyway, glad you got it working. Good luck.


I tested moobile for a short time but switched back to ember :slight_smile:

You can whitelist urls via the config file http://docs.phonegap.com/en/1.9.0/guide_whitelist_index.md.html But i agree with @yohsuzuki that you should compile everything into one local file to decrease loading time on the mobile device.