App Signing
App signing is required to distribute your app on iOS and Android. Digital signatures verify that your app hasn’t been tampered with and identify you as the developer.Overview
iOS requires:- Distribution Certificate (P12 file)
- Provisioning Profile (mobileprovision file)
- Keystore (JKS or BKS file)
- Key alias and passwords
Managed Credentials (Recommended)
EAS automatically generates and stores your credentials securely.First-Time Setup
When you run your first build, EAS will prompt you:- Tab Title
- Tab Title
- Log in to your Apple Developer account
- EAS generates a distribution certificate
- EAS creates a provisioning profile
- Credentials are encrypted and stored on EAS servers
- Creating distribution certificates
- Generating provisioning profiles
- Managing device UDIDs for ad hoc builds
- Automatically renewing expired credentials
Viewing Managed Credentials
View and download your credentials:- Navigate to your project
- Go to Credentials
- Select platform and view/download credentials
Local Credentials
Provide your own credentials using a credentials.json file.Setting Up credentials.json
Add to .gitignore
.gitignore
iOS Code Signing
Generating iOS Credentials Manually
Create Distribution Certificate
- Go to Apple Developer Portal
- Click + to create a new certificate
- Select Apple Distribution (for App Store and Ad Hoc)
- Generate a Certificate Signing Request (CSR) on your Mac:
- Open Keychain Access
- Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority
- Enter your email and name
- Select Save to disk
- Upload the CSR to Apple Developer Portal
- Download the certificate (.cer file)
- Double-click to install in Keychain
- Export as P12:
- Open Keychain Access
- Find the certificate under My Certificates
- Right-click > Export
- Save as .p12 with a password
Create Provisioning Profile
- Go to Provisioning Profiles
- Click + to create new profile
- Select type:
- App Store for production
- Ad Hoc for internal distribution
- Select your App ID
- Select your distribution certificate
- For Ad Hoc: Select devices to include
- Name the profile and download (.mobileprovision)
Configure credentials.json
credentials.json
Multi-Target iOS Projects
If your app has multiple targets (main app + extensions), provide credentials for each:credentials.json
Managing Device UDIDs (Ad Hoc)
For Ad Hoc distribution, register test devices:Android App Signing
Generating an Android Keystore
Create a release keystore using the Java keytool:storepass: Password for the keystore filekeypass: Password for the specific keyalias: Identifier for the keyvalidity: Number of days (10,000 = ~27 years)dname: Distinguished name (use your package name as CN)
Keystore Storage
Move keystore to a secure location:credentials.json
Play App Signing
Google Play uses Play App Signing to re-sign your app with a separate key. How it works:- You upload your app signed with an upload key
- Google strips your signature
- Google re-signs with the app signing key
- Users download the app signed by Google’s key
- Google securely manages your app signing key
- Lost upload key can be reset (app signing key is protected)
- Enhanced security and key rotation
- Go to Google Play Console
- Navigate to your app
- Go to Setup > App signing
- Follow enrollment steps
Migrating Existing Keystore
If you have an existing keystore from a previous build system:Locate Your Keystore
Find your existing keystore file and gather:- Keystore file path
- Keystore password
- Key alias
- Key password
Using Credentials in CI/CD
For CI/CD pipelines, encode credentials as base64:Encoding Credentials
Decoding in CI
Add environment variables to your CI service with base64 values, then decode:Example GitHub Actions Workflow
.github/workflows/build.yml
Credential Security Best Practices
Do’s
- ✅ Use EAS managed credentials for simplicity
- ✅ Keep backups of Android keystores in secure storage
- ✅ Use strong passwords for keystores and certificates
- ✅ Rotate credentials periodically
- ✅ Limit access to credentials to essential team members
- ✅ Use environment variables in CI/CD
Don’ts
- ❌ Never commit credentials.json to version control
- ❌ Never share keystores via email or Slack
- ❌ Never use weak or default passwords
- ❌ Never store credentials in plaintext on developer machines
- ❌ Never reuse keystores across different apps
Troubleshooting
iOS: “Provisioning profile doesn’t include signing certificate”
Solution: Regenerate provisioning profile with correct certificate:Android: “Keystore was tampered with, or password was incorrect”
Solution: Verify passwords in credentials.json match keystore:iOS: “No suitable application records were found”
Solution: Create App ID in Apple Developer Portal:- Go to Identifiers
- Create App ID matching your bundle identifier
- Rebuild with EAS
Android: “Key alias not found”
Solution: List aliases in keystore:Next Steps
- Build Configuration - Configure build profiles in eas.json
- Internal Distribution - Share builds with testers
- Submit to App Stores - Deploy signed builds to stores