To enable code signing for iOS builds, the following certificates and provisioning profiles need to be set up:
-
Certificates:
- Development Certificate: Required for running the app on physical devices during development.
- Distribution Certificate: Required for submitting the app to the App Store.
-
Provisioning Profiles:
- Development Profile: Links the App ID (e.g.,
com.recipeapp.dev
) with the development certificate. - Distribution Profile: Links the App ID (e.g.,
com.recipeapp
) with the distribution certificate.
- Development Profile: Links the App ID (e.g.,
-
App IDs: Unique App IDs need to be created for each environment:
- Development:
com.recipeapp.dev
- Production:
com.recipeapp
- Staging:
com.recipeapp.staging
- Development:
To set this up, you need access to a paid Apple Developer Account.
To enable code signing for Android builds, the following steps are required:
-
Keystores:
- Generate a keystore for each environment:
- Development Keystore: Used for creating development builds.
- Production Keystore: Used for creating production builds.
Use the following command to generate a keystore:
keytool -genkeypair -v -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -keystore <keystore-name>.jks -alias <key-alias>
- Generate a keystore for each environment:
-
Signing Configurations: Configure android/app/build.gradle to include signing configurations for each environment.
-
Secure Keystore Passwords: Do not hard-code passwords in the project. Instead, use environment variables or secure vaults to manage passwords.
-
Environment-Specific Builds: Use the following commands to build for specific environments:
Development Build ./gradlew assembleReleaseDev
Production Build ./gradlew assembleRelease