3

From what I had heard of Firefox OS, one big advantage was that you could build an offline, locally-stored "app" that works on Firefox OS, Android, (and Windows/Mac/others?) with one code-base. However, after looking at the MDN Howtos, I can't seem to find the instructions on cross-compiling for other platforms.

With the Firefox OS simulator installed, I was able to install Firefox OS apps like-native with Windows and Ubuntu, but is there a guide to creating installers for non-FirefoxOS devices, or is this just a technology preview?

Are there any good examples of cross-platform apps written in Firefox, and compiled for multiple platforms, Ubuntu store, Windows store, and/or Android Market?

NoBugs
  • 9,310
  • 13
  • 80
  • 146

2 Answers2

3

If you develop a FirefoxOS app it will be relatively simple to port that into various different mobile platforms, because FirefoxOS apps are mostly standard web technologies. However, currently FirefosOS API's include some new and not yet standard API's as well that are available only in FirefoxOS, for example SystemXHR.

If you want to write an app for FirefoxOS and want to be able to compile the same codebase for Android, iOS, Blackberry etc. your best bet right now is to use Apache Cordova project. They have a nice set of command line tools that make building for various mobile platforms slightly less painful. But you should keep in mind that developing hybrid apps in this way can be pretty daunting process (each native platform has their own quirks and pain points and needs some configuration). FirefoxOS support in Cordova is pretty new, but I am sure it is already better than many native platforms.

That being said, if you are just getting started with mobile web app development, I highly recommend using FirefoxOS as a target platform. They have excellent tools that help you test and develop your app and focus on the open web technologies. FirefoxOS community support is really strong too, which I find very helpful.

Aras
  • 5,878
  • 9
  • 49
  • 76
0

For Windows/Mac/Linux/Android that Firefox Browser is reached, you can put your webapp in Marketplace and chooce your app to support all platform.

Then you could browse Marketplace and install your webapp in Windows/Mac/Linux/Android. Your webapp will be shown in launch menu and appear in application folder in windows/mac/linux/android. The webapp will have a standalone window, just like native application, and can be uninstalled as the native application.

That's what Mozilla called cross platform. With web technology, you could adopt Apache Cordova for the platform that Firefox not reached out yet, though your app performance will be constrained by the supported browser engine (webview) per target system.

gasolin
  • 2,196
  • 1
  • 18
  • 20
  • Are you sure? In desktop Firefox without Firefox-os simulator, it always says "This app is unavailable for your platform". Having to go install that addon, and then go back and try Firefox market, doesn't seem like an end-user-friendly process. – NoBugs Feb 07 '14 at 02:42
  • It because the webapp developer did not select to support the desktop version when they put their app on to marketplace, so the marketplace could not provide a desktop version for user. I totally agree its not a good user experience for desktop user. – gasolin Feb 18 '14 at 06:30
  • Why is it not a good experience for desktop user? Can you point to specific limitations of the Firefox API? – NoBugs Feb 18 '14 at 07:15
  • Its nothing about Firefox-os simulator or API. For some app that support Firefox Desktop version, you can install and launch it without any extra settings, ex: https://marketplace.firefox.com/app/ui-demos – gasolin Feb 19 '14 at 03:08