This article was originally published here PhoneGap Developer App preview for Firefox OS
The cross-platform team at Mozilla is always looking for ways to improve how developers build apps with open web standards. We consider Cordova and PhoneGap to be great tools to achieve that. We are excited to work on improving support for PhoneGap by getting the PhoneGap Developer App into Firefox OS.
The PhoneGap Developer App allows you to easily run PhoneGap apps in multiple platforms, without the need to install SDKs or have a developer subscription. The app is available for Android, iOS and Windows Phone at their respective app stores. You can pair your app with multiple devices at a time and any changes you make to your app’s code get propagated to all devices.
Even though developing for Firefox OS does not require a beefy SDK or a developer subscription, being able to have your changes propagate to multiple devices at once is pretty cool!
We have started working on support for Firefox OS and you can try it out today. In this post we’re going through the steps needed to get the preview version of the PhoneGap developer app in Firefox OS. As they say, a video is worth 1k images:
Getting the dependencies
We will be using a development version of Cordova combined with a development version of the PhoneGap command line interface to get it all working. Luckily, they are very compatible and work well together. You will need to have git, nodejs and npm installed before proceeding.
Let’s first get all modules we’ll need from github:
Now let’s set dependencies up:
Load the app to your device
The app is available at
phonegap-app-developer/platforms/firefoxos/www/, just point the app manager or webIDE to this path and load it to your device or simulator. Once you start the app, you should see a screen with an IP address. That’s where you enter the address of your server.
Starting the server
Let’s get the server going. It will serve your app’s content to the PhoneGap Developer App. Create a new Cordova app:
Now we need to point cordova to the development version of
cordova-firefoxos. In your root app folder,
myapp in our case, create a folder named
.cordova (with the leading dot) and add a file named
config.json to the new folder with the following contents:
Make sure you have the correct full path to
cordova-firefoxos in the
uri property above.
Time to start the server, we’ll switch back to PhoneGap for that:
You should see a line saying
[phonegap] listening on 10.0.0.1:3000. Enter that IP in the PhoneGap Developer App and see your app start running there! Easy.
If you got this far, you’re probably asking why isn’t the app in the marketplace already! As you saw, to get all up an running we required the development version of the PhoneGap command line interface. Once a new version with our new code is released, we can publish the app and not require development version of the command line.
Jump to original –