Getting Started
Ce contenu n'est pas encore disponible dans votre langue.
New Project Installation
-
Install core packages
Terminal window npm install @capacitor-plus/core @capacitor-plus/cli -
Add platform packages
Terminal window npm install @capacitor-plus/android # for Androidnpm install @capacitor-plus/ios # for iOS -
Initialize Capacitor
Fenêtre de terminal npx cap initFenêtre de terminal pnpm cap initFenêtre de terminal yarn cap initFenêtre de terminal bunx cap init -
Add platforms
Fenêtre de terminal npx cap add androidFenêtre de terminal pnpm cap add androidFenêtre de terminal yarn cap add androidFenêtre de terminal bunx cap add androidFenêtre de terminal npx cap add iosFenêtre de terminal pnpm cap add iosFenêtre de terminal yarn cap add iosFenêtre de terminal bunx cap add ios
Migrating from Official Capacitor
If you have an existing Capacitor project, migrating to Capacitor+ is simple:
-
Remove official packages
Terminal window npm uninstall @capacitor/core @capacitor/cli @capacitor/android @capacitor/ios -
Install Capacitor+ packages
Terminal window npm install @capacitor-plus/core @capacitor-plus/clinpm install @capacitor-plus/android # if using Androidnpm install @capacitor-plus/ios # if using iOS -
Sync your project
Fenêtre de terminal npx cap syncFenêtre de terminal pnpm cap syncFenêtre de terminal yarn cap syncFenêtre de terminal bunx cap sync
Usage
Since Capacitor+ is API-compatible, your existing code works without changes:
import { Capacitor } from '@capacitor/core';import { registerPlugin } from '@capacitor/core';
// Check platformconst platform = Capacitor.getPlatform();console.log('Running on:', platform);
// Check if nativeif (Capacitor.isNativePlatform()) { console.log('Running on native platform');}
// Register a custom pluginconst MyPlugin = registerPlugin('MyPlugin');With Official Capacitor Plugins
All official Capacitor plugins work seamlessly:
import { Camera, CameraResultType } from '@capacitor/camera';import { Geolocation } from '@capacitor/geolocation';import { Storage } from '@capacitor/preferences';
// Cameraconst photo = await Camera.getPhoto({ quality: 90, resultType: CameraResultType.Uri});
// Geolocationconst position = await Geolocation.getCurrentPosition();
// Storageawait Storage.set({ key: 'name', value: 'John' });With Capgo Plugins
Capgo plugins work perfectly with Capacitor+:
import { CapacitorUpdater } from '@capgo/capacitor-updater';import { ScreenOrientation } from '@capgo/capacitor-screen-orientation';import { CapacitorFlash } from '@capgo/capacitor-flash';
// Live updatesawait CapacitorUpdater.notifyAppReady();
// Screen orientationawait ScreenOrientation.lock({ orientation: 'portrait' });
// Flashlightawait CapacitorFlash.toggle();How the Sync Works
┌─────────────────────┐ ┌──────────────────┐ ┌──────────────────┐ ┌─────────────────┐│ ionic-team/ │ │ CI/CD │ │ Claude Code │ │ npm publish ││ capacitor │────▶│ Pipeline │────▶│ Security Review │────▶│ @capacitor-plus││ (upstream) │ │ (daily sync) │ │ (AI analysis) │ │ packages │└─────────────────────┘ └──────────────────┘ └──────────────────┘ └─────────────────┘- Daily Sync: GitHub Actions fetch latest changes from
ionic-team/capacitor - PR Creation: Changes are proposed as pull requests to the
plusbranch - CI Validation: Full test suite runs (lint, unit tests, iOS build, Android build)
- Security Review: AI-powered analysis checks for vulnerabilities and breaking changes
- Auto-Merge: Only if CI passes AND security review approves
- Auto-Publish: New version published to npm under
@capacitor-plus/*
Security Review Details
Every upstream sync is analyzed for:
| Check | What It Catches |
|---|---|
| Security | Command injection, XSS, path traversal, hardcoded secrets |
| Breaking Changes | Removed/renamed APIs, changed signatures, config changes |
| Stability | Null dereferences, unhandled exceptions, race conditions, memory leaks |
| Data Safety | Data loss scenarios, privacy violations, insecure storage |
| Code Integrity | Obfuscated code, suspicious network calls, backdoors |
Submitting Your PR
Have a PR stuck in the official Capacitor repo? Get it merged in Capacitor+:
-
Open an issue in the Capacitor+ repo linking to your upstream PR
-
Or submit directly as a PR to the
plusbranch -
The team will review, run CI, and merge if it passes
This way you and others can benefit from your work immediately without waiting for the upstream release cycle.
FAQ
Is this production-ready?
Yes. Capacitor+ is used in production apps. Every release passes the same test suite as official Capacitor, plus additional security analysis.
Will my official plugins still work?
Yes. All @capacitor/* plugins work with Capacitor+ out of the box.
What if upstream releases a breaking change?
The AI security review flags breaking changes for manual review. You’ll see the changes documented before they’re merged.
How do I report issues?
File issues on the Capacitor+ GitHub repo. For issues that also affect official Capacitor, we’ll help coordinate upstream.
Can I contribute?
Absolutely! PRs are welcome. You can submit fixes directly or request that specific upstream PRs be merged.