npm install @capacitor/cli @capacitor/core
npx cap init
npx cap add ios
npx cap add android
import { Plugins } from '@capacitor/core';
const { LocalNotifications } = Plugins;
LocalNotifications.schedule({
notifications: [
{
title: "On sale",
body: "Widgets are 10% off. Act fast!",
id: 1,
schedule: { at: new Date(Date.now() + 1000 * 5) },
sound: null,
attachments: null,
actionTypeId: "",
extra: null
}
]
});
Build web-based applications that run equally well across iOS, Android, and as Progressive Web Apps.
Access the full Native SDKs on each platform, and easily deploy to the App Stores (and the web).
Add custom native functionality with a simple Plugin API, or use existing Cordova plugins with our compatibility layer.
Capture, save photos, and configure hardware parameters like focus and white balance.
Save and read assets, documents, and other data your users need by accessing native file systems
Build location-aware apps by polling for the current device location or subscribing to location updates.
Access the device accelerometer sensors to respond to changes in device motion in 3d space.
Build applications that send and respond to local and server-pushed notifications
Use haptic hardware to provide physical feedback for user actions
Respond to changes in accessibility states and extend your app with a11y features
Extend your app with custom native and web code to provide consistent APIs across platforms.
Drop Capacitor into any existing web app project, framework or library. Convert an existing React, Angular, Svelte, Vue, Ember (or your preferred Web Framework) project to native mobile and use any UI library of your choosing.