PhoneGap is a framework for creating mobile apps using HTML5/JavaScript/CSS. It provides a standardized API for accessing mobile device features, and build tools for creating native packages. WebSharper.PhoneGap brings WebSharper integration for PhoneGap, allowing you write F# apps that work without modification on iOS, Android, Windows Phone, and many other platforms. Current version supports PhoneGap 3.4.0 API.
Minimal example (requires WebSharper.PhoneGap
NuGet package):
open IntelliFactory.WebSharper.PhoneGap
let Program =
JavaScript.Log("==> starting Program")
Events.deviceReady.add <| fun () ->
JavaScript.Log("==> deviceReady")
For a complete example WebSharper.PhoneGap project, see PhoneGapDemo.
The IntelliFactory.WebSharper.PhoneGap
namespace also contains
modules corresponding to various PhoneGap plugins, such as Camera,
Contacts, DeviceMotion, and Geolocation.
Bindings are currently generated via the TypedPhoneGap project. See its sources for a definitive API reference.