Key power of Phonegap project is its cloud base build service.
You create website, build it using Phonegap Build and you get native app.
Great!
But another part of Phonegap project is Phonegap API.
You use it to access mobile device's resources (GPS, storage etc.).
So you extend your website/app with support for Phonegap API.
But how to build it ?
Official docs guides, depending on OS development platform, install Eclipse, SDK's etc.
In this approach we are responsible to build app.
So you say no! I want to build my website/api that uses Cordova (phonegap) API using Phonegap Build cloud service.
Now here comes the catch 22 !
When you develop website with Cordova API and build it on your own you are expected to use something like this:
<script type="text/javascript" src="js/cordova-2.5.0.js"></script>
But when you want the very same code to build on Phonegap Build service you must drop above line and use this :
<script type="text/javascript" src="phonegap.js"></script>
Already twice I've lost some time to figure this out.
I don't know am I dumb or what but this info is not on any get started pages or I did not find them.
Here is officially Github repo of phonegap examples that uses above approach:
https://github.com/phonegap/phonegap-app-hello-world
No comments:
Post a Comment