A platform implements
the messages between the browser and native architecture.
1) Installing phonegap-js to a PhoneGap Platform
The recommended approach is to use a Git Submodule
$ cd phonegap-platform $ mkdir lib $ git submodule add git://github.com/davejohnson/phonegap-js.git lib/phonegap-js
2) Implementing PhoneGap.exec
This is where
PhoneGap.exec steps in.
To learn how to implement
PhoneGap.exec, please read lib/phonegap/README.md.
Ideally, a platform should not need to define extra functionality.
To learn how to implement extra functionality, please read lib/phonegap/phonegap.extras.md.
4) Building phonegap.x.x.x.js for your PhoneGap Platform
Once you have implemented
PhoneGap.exec, you can generate
$ make build
4) Testing phonegap.js for a PhoneGap Platform
Point your PhoneGap application to
@TODO This needs to be streamlined better. Perhaps
make can copy the generated
phonegap.js to the tests directory.
Q: Why are a bunch of tests commented out in
A: In short, no one has got it working yet. Maybe the the tests are not fully implemented. Maybe the API is still not considered common to all platforms. Maybe no one has got around to implementing it. Contributions are welcome!