๐Ÿ“ฆ ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web โšก๏ธ

โ˜… 14.8k stars โ‘‚ 1.1k forks ๐Ÿ‘ 14.8k watching โš–๏ธ MIT License
androidcapacitorcordovacross-platformcsshtmlioniciosjavajavascriptpwaswift
๐Ÿ“ฅ Clone https://github.com/ionic-team/capacitor.git
HTTPS git clone https://github.com/ionic-team/capacitor.git
SSH git clone git@github.com:ionic-team/capacitor.git
CLI gh repo clone ionic-team/capacitor
Joey Pender Joey Pender fix(SystemBars): get correct style on handleOnConfigurationChanged (#8295) 2a66b44 6 days ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ .vscode
๐Ÿ“ android
๐Ÿ“ android-template
๐Ÿ“ cli
๐Ÿ“ core
๐Ÿ“ ios
๐Ÿ“ ios-pods-template
๐Ÿ“ ios-spm-template
๐Ÿ“ scripts
๐Ÿ“„ .eslintignore
๐Ÿ“„ .gitignore
๐Ÿ“„ .npmrc
๐Ÿ“„ .prettierignore
๐Ÿ“„ CHANGELOG.md
๐Ÿ“„ CODE_OF_CONDUCT.md
๐Ÿ“„ CONTRIBUTING.md
๐Ÿ“„ lerna.json
๐Ÿ“„ LICENSE
๐Ÿ“„ nx.json
๐Ÿ“„ package.json
๐Ÿ“„ README.md
๐Ÿ“„ README.md


โšก๏ธ 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. ๐Ÿ’–