Encryption
Copy a setup prompt with the install steps and the full markdown guide for this plugin.
This documentation explains how to migrate to the encryption v2 system. Learn more about the encryption v2 system in the blog post.
1. Create Key Pair
Section titled “1. Create Key Pair”npx @capgo/cli key createStore the private key securely. Never commit it to source control or share it with untrusted parties.
This command:
- Creates a new key pair in your app
- Removes the old key from your Capacitor config
- Keeps old key files for backward compatibility
2. Update Capacitor Config
Section titled “2. Update Capacitor Config”When prompted “Do you want to setup encryption with the new channel in order to support old apps and facilitate the migration?”, select yes. This adds a new defaultChannel option to your Capacitor config.
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. Upload Bundle to New Channel
Section titled “3. Upload Bundle to New Channel”npx @capgo/cli bundle upload --channel encryption_v24. Enable Self-Assignment
Section titled “4. Enable Self-Assignment”npx @capgo/cli channel set encryption_v2 --self-assign5. Upload to Old Channel
Section titled “5. Upload to Old Channel”npx @capgo/cli bundle upload --channel production6. Cleanup (After 3-4 Months)
Section titled “6. Cleanup (After 3-4 Months)”Once all users have updated their apps:
- Remove
defaultChannelfrom your Capacitor config - Delete the old channel:
npx @capgo/cli channel delete encryption_v2Keep going from Encryption
Section titled “Keep going from Encryption”If you are using Encryption to plan security and compliance, connect it with Encryption for the implementation detail in Encryption, Compliance for the implementation detail in Compliance, Capgo Security Scanner for the product workflow in Capgo Security Scanner, Capgo Security for the product workflow in Capgo Security, and Capgo Trust Center for the product workflow in Capgo Trust Center.