网页
综合
更新时间 2026-11-14 16:24:01
Installing Capacitor | Capacitor Documentation
自动蜘蛛
capacitorjs.com
正文约 1125 字
This guide will help you install Capacitor into an existing frontend web app.
If starting a new app, we recommend using the documentation from your JavaScript framework of choice and then following this guide to integrate Capacitor.
You can also create a new basic app with npm init @capacitor/app.
Capacitor provides a native mobile runtime and API layer for web apps. It does not come with any specific set of UI controls. We recommend you use a mobile component framework (such as Ionic Framework).
Make sure your environment is set up for the platforms you will be building for.
Capacitor was designed to drop into any modern JavaScript web app. Projects must meet the following requirements:
In the root of your app, install Capacitor:
Then, initialize Capacitor using the CLI questionnaire:
The CLI will ask you a few questions, starting with your app name, and the package id you would like to use for your app.
The npx cap command is how Capacitor is executed locally on the command-line in your project. Learn more about the Capacitor CLI.
Get started with iOS ›
Get started with Android ›
Developer Workflow Guide ›
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。