认识
官网:https://capacitorjs.com/
文档:https://capacitorjs.com/docs
仓库:https://github.com/ionic-team/capacitor
Capacitor lets you run web apps natively on iOS, Android, Web, and more with a single codebase and cross-platform APIs. 简而言之,类似 Apache Cordova 工具,我们负责通过 HTML JavaScript CSS 来编写应用功能,Capacitor 负责实现 Android iOS Browser 相关的代码,最终获得跨平台的应用。
Cordova, now replaced by Capacitor by the Ionic folks seems to support bringing IOS/Android apps to the desktop using Electron, but not the other way around.
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
性质
根据官方文档,其默认支持 iOS Androd Web 平台,如果需要构建其他平台(Windows Linux macOS),则需要其他插件的支持;
https://capacitorjs.com/docs
应用
WIP
改进
Build apps targeting Windows, Mac, and Linux
Build apps targeting Windows, Mac, and Linux – Capacitor – Ionic Forum
You can use capacitor-community/electron | https://github.com/capacitor-community/electron