This repository provides WebSharper bindings for Capacitor CapGo plugins, enabling seamless integration of CapGo functionality into WebSharper projects.
WebSharper Capacitor CapGo extends the functionality of WebSharper Capacitor by providing bindings for plugins maintained by CapGo. These bindings facilitate the development of cross-platform applications by allowing seamless integration of CapGo's advanced features into WebSharper projects.
The following CapGo plugins are currently bound in this repository:
-
SocialLogin - @capgo/capacitor-social-login
-
Uploader - @capgo/capacitor-uploader
-
NavigationBar - @capgo/capacitor-navigation-bar
-
CapacitorDataStorageSqlite - @capgo/capacitor-data-storage-sqlite
-
ScreenRecorder - @capgo/capacitor-screen-recorder
-
NativePurchases - @capgo/native-purchases
-
CapacitorFlash - @capgo/capacitor-flash
-
CapacitorUpdater - @capgo/capacitor-updater
-
HomeIndicator - @capgo/home-indicator
-
NativeGeocoder - @capgo/nativegeocoder
-
CapacitorCrisp - @capgo/capacitor-crisp
-
CapacitorMute - @capgo/capacitor-mute
-
NativeAudio - @capgo/native-audio
-
CapacitorDownloader - @capgo/capacitor-downloader
-
CapacitorShake - @capgo/capacitor-shake
-
IvsPlayer - @capgo/ivs-player
-
NativeMarket - @capgo/native-market
-
CapacitorUpdater - @capgo/capacitor-updater
Before starting, ensure you have the following:
- Node.js and npm installed on your machine.
- Capacitor set up for managing cross-platform apps.
- WebSharper for building F#-based web applications.
-
Initialize a Capacitor project if not already done:
npm init # Initialize a new Node.js project npm install # Install default dependencies npm i @capacitor/core # Install Capacitor core library npm i -D @capacitor/cli # Install Capacitor CLI as a dev dependency npx cap init "YourApp" com.example.yourapp --web-dir wwwroot/dist # Initialize Capacitor in the project
-
Add the WebSharper Capacitor NuGet package:
dotnet add package WebSharper.Capacitor --version 8.0.0.494-beta1
This package is required because WebSharper Capacitor CapGo builds upon the core functionality provided by WebSharper Capacitor. It ensures compatibility and seamless integration of Capacitor plugins into your WebSharper project.
-
Add the WebSharper Capacitor CapGo NuGet package:
dotnet add package WebSharper.Capacitor.CapGo --version 8.0.0.494-beta1
-
Choose and install the CapGo plugins you want to use. For example, to use the SocialLogin plugin:
npm i @capgo/capacitor-social-login
-
Build your project:
npm i vite # Install Vite for building your web assets npx vite build # Build your web project with Vite
-
Sync configuration:
npx cap sync # Sync Capacitor configuration and plugins
- Ensure your Capacitor project is correctly configured with
capacitor.config.json
. - Check out sample usage of the plugin in the
WebSharper.Capacitor.CapGo.Sample
directory.