Skip to content

Latest commit

 

History

History
91 lines (64 loc) · 4.39 KB

README.md

File metadata and controls

91 lines (64 loc) · 4.39 KB

WebSharper Capacitor CapGo

This repository provides WebSharper bindings for Capacitor CapGo plugins, enabling seamless integration of CapGo functionality into WebSharper projects.

Overview

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.

Currently Bound Plugins

The following CapGo plugins are currently bound in this repository:

  1. SocialLogin - @capgo/capacitor-social-login

  2. Uploader - @capgo/capacitor-uploader

  3. NavigationBar - @capgo/capacitor-navigation-bar

  4. CapacitorDataStorageSqlite - @capgo/capacitor-data-storage-sqlite

  5. ScreenRecorder - @capgo/capacitor-screen-recorder

  6. NativePurchases - @capgo/native-purchases

  7. CapacitorFlash - @capgo/capacitor-flash

  8. CapacitorUpdater - @capgo/capacitor-updater

  9. HomeIndicator - @capgo/home-indicator

  10. NativeGeocoder - @capgo/nativegeocoder

  11. CapacitorCrisp - @capgo/capacitor-crisp

  12. CapacitorMute - @capgo/capacitor-mute

  13. NativeAudio - @capgo/native-audio

  14. CapacitorDownloader - @capgo/capacitor-downloader

  15. CapacitorShake - @capgo/capacitor-shake

  16. IvsPlayer - @capgo/ivs-player

  17. NativeMarket - @capgo/native-market

  18. CapacitorUpdater - @capgo/capacitor-updater

Getting Started

Prerequisites

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.

Installation

  1. 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
  2. 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.

  3. Add the WebSharper Capacitor CapGo NuGet package:

    dotnet add package WebSharper.Capacitor.CapGo --version 8.0.0.494-beta1
  4. Choose and install the CapGo plugins you want to use. For example, to use the SocialLogin plugin:

    npm i @capgo/capacitor-social-login
  5. Build your project:

    npm i vite                # Install Vite for building your web assets
    npx vite build            # Build your web project with Vite
  6. Sync configuration:

    npx cap sync              # Sync Capacitor configuration and plugins

Notes

  • 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.