Syntax
Arguments
platform
The platform to generate credentials for. Optional.android- Generate Android keystore (JKS)ios- Generate iOS certificate signing request (CSR)both- Generate credentials for both platforms
Options
—reset
Generate new keystore and PEM certificate for Google Play Console reset.Examples
Generate Android keystore
Generate iOS CSR
Generate both
Generate reset credentials
What it creates
Android
Creates a JKS (Java KeyStore) file for signing Android apps: Files created:android.jks- Your keystore file (keep this secure!).envupdated with keystore information
- Key alias name
- Keystore password
- Key password
- Certificate information (name, organization, etc.)
storage/credentials/android.jks
The keystore is automatically added to .gitignore.
iOS
Creates a Certificate Signing Request (CSR) for requesting certificates from Apple: Files created:ios.certSigningRequest- CSR file to upload to Apple Developerios.key- Private key (keep this secure!).envupdated with certificate information
- Email address
- Common name (usually your name)
- Organization name
storage/credentials/ios.certSigningRequest
Reset (Android)
When using--reset, creates:
- New keystore
- PEM certificate file to upload to Play Console
Android keystore details
The generated keystore:- Type: JKS (Java KeyStore)
- Algorithm: RSA
- Key size: 2048 bits
- Validity: 10,000 days (approximately 27 years)
- Hash algorithm: SHA256
Important notes
- Backup your keystore: If you lose it, you cannot update your app on Play Store
- Keep it secure: Don’t commit to version control
- Remember passwords: Store them in a password manager
- Use same keystore: For all builds of the same app
iOS CSR details
The generated CSR:- Algorithm: RSA
- Key size: 2048 bits
- Hash algorithm: SHA256
Next steps after CSR generation
- Go to Apple Developer Portal
- Navigate to Certificates, Identifiers & Profiles
- Create a new certificate (Distribution or Development)
- Upload the
.certSigningRequestfile - Download the certificate (
.cerfile) - Install in Xcode or use with
native:package
Environment variable updates
Android
iOS
Security best practices
-
Never commit credentials
- Keystore files are automatically added to
.gitignore - Never commit
.envwith passwords
- Keystore files are automatically added to
-
Secure storage
- Use encrypted storage for keystore files
- Consider using a hardware security module (HSM) for production
-
Password management
- Use strong, unique passwords
- Store in a password manager
- Don’t share passwords via email/chat
-
Backup strategy
- Keep encrypted backups of keystores
- Store in multiple secure locations
- Document recovery procedures
-
Access control
- Limit who has access to signing credentials
- Use CI/CD secrets management
- Rotate credentials periodically
Common workflows
First-time app setup
Lost keystore recovery (Android)
If you’ve lost your Android keystore:- Go to Play Console
- Navigate to Release > Setup > App signing
- Follow the “Request upload key reset” process
- Upload the generated PEM certificate
Team onboarding
For new team members who need to build:- Share keystore file securely (encrypted)
- Share passwords via password manager
- Have them add to
.env:
Troubleshooting
”keytool: command not found”
Install Java Development Kit (JDK):“openssl: command not found”
OpenSSL is usually pre-installed. If not:Permission denied when creating files
Check thatstorage/credentials/ directory is writable:
See also
- native:package - Build signed packages
- Signing & Distribution - Complete signing guide