An Expo config plugin for setting up code signing for Android and iOS builds during Expo prebuild.
npm install react-native-expo-signedreact-native-expo-signed is a custom Expo Config Plugin that automatically injects code signing settings into your native projects for both Android and iOS during the prebuild stage.
- Android: Copies your keystore file into the project, sets up gradle.properties, and updates build.gradle for release signing.
- iOS: Updates the Xcode project signing settings (manual or automatic), development team, code sign identity, and provisioning profile only if values are provided.
---
- β
Single plugin handles both Android and iOS
- β
One clean "plugins" entry in app.json/app.config.js
- β
iOS values are only set if provided (wonβt overwrite existing Xcode settings)
- β
Android keystore setup is automated
- β
Customizable app_path for Android projects in non-standard directories
---
Install using npm:
``sh`
npm install react-native-expo-signed --save-dev
Or using Yarn:
`sh`
yarn add -D react-native-expo-signed
---
In your app.json or app.config.js, add to the plugins array:
`json`
{
"expo": {
"plugins": [
[
"react-native-expo-signed",
{
"android": {
"app_path": "./android/app", // optional, defaults to ./android/app
"store_file": {
"key": "MY_UPLOAD_STORE_FILE",
"value": "my-upload-key.keystore"
},
"key_alias": {
"key": "MY_UPLOAD_KEY_ALIAS",
"value": "my-key-alias"
},
"store_password": {
"key": "MY_UPLOAD_STORE_PASSWORD",
"value": "**"
},
"key_password": {
"key": "MY_UPLOAD_KEY_PASSWORD",
"value": "**"
},
"keystorePath": "./src/assets"
},
"ios": {
"CODE_SIGN_STYLE": "Manual",
"CODE_SIGN_IDENTITY": "\"iPhone Distribution\"",
"DEVELOPMENT_TEAM": "Team_ID",
"PROVISIONING_PROFILE_SPECIFIER": "Profile Name"
}
}
]
]
}
}
---
| Key | Description | Example |
| -------------------------------- | --------------------------------------- | ----------------------- |
| CODE_SIGN_STYLE | Signing style (Manual or Automatic) | "Manual" |CODE_SIGN_IDENTITY
| | Code signing identity | "iPhone Distribution" |DEVELOPMENT_TEAM
| | Apple Developer Team ID | "Team_ID" |PROVISIONING_PROFILE_SPECIFIER
| | Provisioning profile name | "Profile Name" |
Behavior:
If any of the above keys are missing from ios config, the plugin will not change that setting in your Xcode project.
---
| Key | Description | Example |
| ---------------------- | -------------------------------------------------- | ----------------------------- |
| app_path | Path to the Android app directory (optional) | "./android/app" _(default)_ |store_file.key
| | Keystore path property name in gradle.properties | "MY_UPLOAD_STORE_FILE" |store_file.value
| | Keystore filename | "my-upload-key.keystore" |key_alias.key
| | Key alias property name | "MY_UPLOAD_KEY_ALIAS" |key_alias.value
| | Alias name | "my-key-alias" |store_password.key
| | Store password property name | "MY_UPLOAD_STORE_PASSWORD" |store_password.value
| | Store password value | "password123" |key_password.key
| | Key password property name | "MY_UPLOAD_KEY_PASSWORD" |key_password.value
| | Key password value | "password123" |keystorePath
| | Folder path containing keystore file | "./" _(default)_ |
---
1. Android:
- Adds required signing properties to gradle.propertieskeystorePath
- Copies keystore file from to app_pathbuild.gradle
- Updates to use release signing config
2. iOS:
- Opens .xcodeproj during prebuildbuildSettings` keys only if a value is provided
- Updates
- Leaves untouched settings alone
---
MIT License
---