加密
复制一个包含安装步骤和本插件的完整Markdown指南的设置命令。
本文档解释了如何迁移到加密v2系统。了解更多关于加密v2系统的信息,请参阅 博客文章.
1. 创建密钥对
Section titled “1. 生成密钥对”npx @capgo/cli key create安全存储私钥。永远不要将其提交到源代码控制或与不信任的方共享。
此命令:
- 在您的应用程序中创建新密钥对
- 从您的Capacitor配置中删除旧密钥
- 保留旧密钥文件以实现向后兼容
2. 更新Capacitor配置
Section titled “2. 更新Capacitor配置”当提示“是否要使用新频道设置加密,以便支持旧应用程序并简化迁移?”时,选择是。这会向您的__CAPGO_KEEP_0__配置中添加一个新选项。 defaultChannel 当提示“是否要使用新频道设置加密,以便支持旧应用程序并简化迁移?”时,选择是。这会向您的Capacitor配置中添加一个新选项。
import { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = { appId: 'com.example.app', appName: 'Example App', plugins: { CapacitorUpdater: { // ... other options defaultChannel: 'encryption_v2' // New apps will use this channel } }};
export default config;3. 将打包文件上传到新频道
标题:3. 将打包文件上传到新频道npx @capgo/cli bundle upload --channel encryption_v24. 启用自我赋值
标题:4. 启用自我赋值npx @capgo/cli channel set encryption_v2 --self-assign5. 上传到旧频道
标题:5. 上传到旧频道npx @capgo/cli bundle upload --channel production6. 清理(3-4个月后)
标题:6. 清理(3-4个月后)一旦所有用户都更新了他们的应用:
- 移除
defaultChannel从你的Capacitor配置中 - 删除旧频道:
npx @capgo/cli channel delete encryption_v2加密
继续从加密If you are using __CAPGO_KEEP_0__ for security and compliance, connect it with __CAPGO_KEEP_0__ for the implementation detail in __CAPGO_KEEP_0__, __CAPGO_KEEP_1__ for the implementation detail in __CAPGO_KEEP_1__, __CAPGO_KEEP_2__ Security Scanner for the product workflow in __CAPGO_KEEP_2__ Security Scanner, __CAPGO_KEEP_3__ Security for the product workflow in __CAPGO_KEEP_3__ Security, and __CAPGO_KEEP_4__ Trust Center 東为突了 to plan security and compliance connect it with for the implementation detail in for the implementation detail in __CAPGO_KEEP_2__ Security Scanner Capgo Security Scanner for the product workflow in Capgo Security Scanner, Capgo Security for the product workflow in Capgo Security, and Capgo 为产品工作流程在Capgo信任中心中.