MCPcopy
hub / github.com/ionic-team/capacitor

github.com/ionic-team/capacitor @8.4.1 sqlite

repository ↗ · DeepWiki ↗ · release 8.4.1 ↗
1,462 symbols 4,295 edges 176 files 296 documented · 20%
README

⚡️ Cross-platform apps with JavaScript and the Web ⚡️


Capacitor lets you run web apps natively on iOS, Android, Web, and more with a single codebase and cross-platform APIs.

Capacitor provides a cross-platform API and code execution layer that makes it easy to call Native SDKs from web code and to write custom native plugins that your app may need. Additionally, Capacitor provides first-class Progressive Web App support so you can write one app and deploy it to the app stores and the mobile web.

Capacitor comes with a Plugin API for building native plugins. Plugins can be written inside Capacitor apps or packaged into an npm dependency for community use. Plugin authors are encouraged to use Swift to develop plugins in iOS and Kotlin (or Java) in Android.

Getting Started

Capacitor was designed to drop-in to any existing modern web app. Run the following commands to initialize Capacitor in your app:

npm install @capacitor/core @capacitor/cli
npx cap init

Next, install any of the desired native platforms:

npm install @capacitor/android
npx cap add android
npm install @capacitor/ios
npx cap add ios

New App?

For new apps, we recommend trying the Ionic Framework with Capacitor.

To begin, install the Ionic CLI (npm install -g @ionic/cli) and start a new app:

ionic start --capacitor

FAQ

What are the differences between Capacitor and Cordova?

In spirit, Capacitor and Cordova are very similar. Capacitor offers backward compatibility with a vast majority of Cordova plugins.

Capacitor and Cordova differ in that Capacitor:

  • takes a more modern approach to tooling and plugin development
  • treats native projects as source artifacts as opposed to build artifacts
  • is maintained by the Ionic Team 💙😊

See the docs for more details.

Do I need to use Ionic Framework with Capacitor?

No, you do not need to use Ionic Framework with Capacitor. Without the Ionic Framework, you may need to implement Native UI yourself. Without the Ionic CLI, you may need to configure tooling yourself to enable features such as livereload. See the docs for more details.

Contributing

See CONTRIBUTING.md.

Contributors

Made possible by the Capacitor community. 💖

Extension points exported contracts — how you extend this code

HostMask (Interface)
(no doc) [7 implementers]
android/capacitor/src/main/java/com/getcapacitor/util/HostMask.java
CapacitorCookiesPlugin (Interface)
(no doc) [3 implementers]
core/src/core-plugins.ts
Plugin (Interface)
(no doc) [2 implementers]
cli/src/plugin.ts
PatchedXMLHttpRequestConstructor (Interface)
(no doc)
core/native-bridge.ts
ICapacitorHttpUrlConnection (Interface)
This interface was extracted from CapacitorHttpUrlConnection to enable mocking that class. [2 implementers]
android/capacitor/src/main/java/com/getcapacitor/plugin/util/ICapacitorHttpUrlConnection.java
CapacitorHttpPlugin (Interface)
(no doc) [3 implementers]
core/src/core-plugins.ts
RunTaskOptions (Interface)
(no doc)
cli/src/common.ts
AppStatusChangeListener (Interface)
Interface for callbacks when app status changes.
android/capacitor/src/main/java/com/getcapacitor/App.java

Core symbols most depended-on inside this repo

error
called by 118
android/capacitor/src/main/java/com/getcapacitor/Logger.java
toString
called by 76
android/capacitor/src/main/java/com/getcapacitor/JSValue.java
get
called by 64
core/src/core-plugins.ts
warn
called by 59
android/capacitor/src/main/java/com/getcapacitor/Logger.java
getString
called by 45
android/capacitor/src/main/java/com/getcapacitor/util/JSONUtils.java
put
called by 44
core/src/core-plugins.ts
parse
called by 42
android/capacitor/src/main/java/com/getcapacitor/util/HostMask.java
fatal
called by 40
cli/src/errors.ts

Shape

Method 813
Function 459
Class 102
Interface 77
Enum 11

Languages

Java56%
TypeScript44%

Modules by API surface

android/capacitor/src/main/java/com/getcapacitor/Bridge.java105 symbols
core/src/core-plugins.ts63 symbols
android/capacitor/src/main/java/com/getcapacitor/Plugin.java62 symbols
android/capacitor/src/main/java/com/getcapacitor/CapConfig.java58 symbols
android/capacitor/src/main/java/com/getcapacitor/WebViewLocalServer.java41 symbols
android/capacitor/src/main/java/com/getcapacitor/cordova/MockCordovaWebViewImpl.java40 symbols
cli/src/common.ts36 symbols
core/cordova.js34 symbols
android/capacitor/src/main/java/com/getcapacitor/PluginCall.java29 symbols
cli/src/cordova.ts28 symbols
android/capacitor/src/main/java/com/getcapacitor/plugin/util/HttpRequestHandler.java26 symbols
android/capacitor/src/main/java/com/getcapacitor/plugin/util/CapacitorHttpUrlConnection.java26 symbols

Dependencies from manifests, versioned

@capacitor/docgen0.2.2 · 1×
@ionic/cli-framework-output2.2.8 · 1×
@ionic/eslint-config0.4.0 · 1×
@ionic/prettier-config4.0.0 · 1×
@ionic/swiftlint-config2.0.0 · 1×
@ionic/utils-subprocess3.0.1 · 1×
@ionic/utils-terminal2.3.5 · 1×
@rollup/plugin-node-resolve10.0.0 · 1×
@rollup/plugin-replace2.4.2 · 1×
@types/debug4.1.12 · 1×
@types/fs-extra11.0.4 · 1×
@types/jest29.5.0 · 1×

For agents

$ claude mcp add capacitor \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact