snapshot of https://github.com/mattermost/mattermost.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 2s
Server CI Nightly Race / Build Environment (push) Failing after 1s

This commit is contained in:
upstream-mirror
2026-09-16 00:29:55 +05:00
commit 240db4e2a7
15309 changed files with 2173406 additions and 0 deletions

View File

@@ -0,0 +1,136 @@
---
title: "Build the Android mobile app"
sidebar_position: 1
---
At times, you may want to build your own Mattermost mobile app. The most common use cases are:
* To white label the Mattermost mobile app.
* To use your own deployment of the Mattermost Push Notification Service (always required if you are building your own version of the mobile app).
# Build preparations
### 1. Package name and source files
* Ensure the package ID of the mobile app remains the same as the one in the original [mattermost-mobile GitHub repository](https://github.com/mattermost/mattermost-mobile) in `com.mattermost.rnbeta`.
* Source files for the main package remain under the `android/app/src/main/java/com/mattermost/rnbeta` folder.
### 2. Generate a signing key
As Android requires all apps to be digitally signed with a certificate before they can be installed building the Android app for distribution requires the release APK to be signed.
To generate the signed key, use **keytool** which comes with the JDK required to develop the Android app. (see [Developer Setup](/developers/contribute/more-info/mobile/developer-setup#additional-setup-for-android)).
```sh
$ keytool -genkey -v -keystore <my-release-key>.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
```
The above command prompts you for passwords for the keystore and key (make sure you use the same password for both), and asks you to provide the Distinguished Name fields for your key. It then generates the keystore as a file called `<my-release-key>.keystore`.
The keystore contains a single key, valid for 10000 days. The alias is a name that you will use later when signing your app, so remember to take a note of the alias.
---
<Note title="Note">
* Replace `<my-release-key>` with the filename you want to specify.
* Remember to keep your keystore file private and never commit it to version control.
</Note>
---
### 3. Create a new app in Google Play
Create a new application using the [Google Play console](https://play.google.com/console/developers). If you already have an app registered in the Google Play console you can skip this step.
### 4. Set up Gradle variables
Now that we have created the keystore file we can tell the build process to use that file:
- Copy or move the `my-release-key.keystore` file under a directory that you can access. It can be in your home directory or anywhere in the file system.
- Edit the `gradle.properties` file in your `$HOME` directory (e.g. `$HOME/.gradle/gradle.properties`), or create it if one does not exist, and add the following:
```sh
MATTERMOST_RELEASE_STORE_FILE=/full/path/to/directory/containing/my-release-key.keystore
MATTERMOST_RELEASE_KEY_ALIAS=my-key-alias
MATTERMOST_RELEASE_PASSWORD=*****
```
---
<Note title="Note">
* Replace `/full/path/to/directory/containing/my-release-key.keystore` with the full path to the actual keystore file and `********` with the actual keystore password.
* Back up your keystore and don't forget the password.
</Note>
---
---
**Important:**
Once you publish the app on the Play Store, the app needs to be signed with the same key every time you want to distribute a new build. If you lose this key, you will need to republish your app under a different package id (losing all downloads and ratings).
---
### 5. Configure environment variables
To make it easier to customize your build, we've defined a few environment variables that are going to be used by Fastlane during the build process.
| Variable | Description | Default | Required |
|----------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------|
| `COMMIT_CHANGES_TO_GIT` | Should the Fastlane script ensure that there are no changes to Git before building the app and that every change made during the build is committed back to Git. <br/><br/>Valid values are: `true`, `false` | `false` | No |
| `BRANCH_TO_BUILD` | Defines the Git branch that is going to be used for generating the build. <br/><br/>**Make sure that, if this value is set, the branch it is set to exists**. | `$GIT_BRANCH` | No |
| `GIT_LOCAL_BRANCH` | Defines the local branch to be created from `BRANCH_TO_BUILD` to ensure the base branch does not get any new commits on it. <br/><br/>**Make sure a branch with this name does not yet exist in your local Git repository**. | build | No |
| `RESET_GIT_BRANCH` | Defines if, once the build is done, the branch should be reset to the initial state before building and whether to also delete the branch created to build the app. <br/><br/>Valid values are: `true`, `false` | `false` | No |
| `VERSION_NUMBER ` | Set the version of the app at build time to a specific value, rather than using the one set in the project. | | No |
| `INCREMENT_VERSION_NUMBER_MESSAGE` | Set the commit message when changing the app version number. | Bump app version number to | No |
| `INCREMENT_BUILD_NUMBER` | Defines if the app build number should be incremented. <br/><br/>Valid values are: `true`, `false` | `false` | No |
| `BUILD_NUMBER` | Set the build number of the app at build time to a specific value, rather than incrementing the last build number. | | No |
| `INCREMENT_BUILD_NUMBER_MESSAGE` | Set the commit message when changing the app build number. | Bump app build number to | No |
| `ANDROID_BUILD_TASK` | The build tasks for Android. This is a comma-separated list of tasks that can have two values: 'assemble' and 'bundle'. <br/><br/>`assemble` is used for building `APK` file and `bundle` is used for building `AAB` file. | assemble | No |
| `APP_NAME` | The name of the app as it is going to be shown on the device home screen. | Mattermost Beta | Yes |
| `APP_SCHEME` | The URL naming scheme for the app as used in direct deep links to app content from outside the app. | mattermost | No |
| `REPLACE_ASSETS` | Override the assets as described in [White Labeling](/developers/contribute/more-info/mobile/build-your-own/white-label). <br/><br/>Valid values are: `true`, `false` | `false` | No |
| `MAIN_APP_IDENTIFIER` | The package identifier for the app. | | Yes |
| `BUILD_FOR_RELEASE` | Defines if the app should be built in release mode. <br/><br/>Valid values are: `true`, `false` <br/><br/>**Make sure you set this value to true if you plan to submit this app Google Play or distribute it in any other way**. | `false` | Yes |
| `SEPARATE_APKS` | Build one APK per achitecture (armeabi-v7a, x86, arm64-v8a and x86_64) as well as a universal APK. The advantage is the size of the APK is reduced by about 4MB. <br/><br/>People will download the correct APK from the Play Store based on the CPU architecture of their device. | `false` | Yes |
| `SUBMIT_ANDROID_TO_GOOGLE_PLAY` | Should the app be submitted to the Play Store once it finishes building, use along with `SUPPLY_TRACK`.<br/><br/>Valid values are: `true`, `false` | `false` | Yes |
| `SUPPLY_TRACK` | The track of the application to use when submitting the app to Google Play Store. Valid values are: `alpha`, `beta`, `production` <br/><br/>**RIt is not recommended to submit the app to production. First try any of the other tracks and then promote your app using the Google Play console**. | `alpha` | Yes |
| `SUPPLY_PACKAGE_NAME` | The package Id of your application, make sure it matches `MAIN_APP_IDENTIFIER`. | | Yes |
| `SUPPLY_JSON_KEY` | The path to the service account `json` file used to authenticate with Google.<br/><br/>See the [Supply documentation]( https://docs.fastlane.tools/actions/supply/#setup) to learn more. | | Yes |
---
<Note title="Note">
To configure your variables create the file `./mattermost-mobile/fastlane/.env` where `.env` is the filename. You can find the sample file `env_vars_example` [here](https://github.com/mattermost/mattermost-mobile/blob/master/fastlane/env_vars_example).
</Note>
---
### 6. Google services
Replace the `google-services.json` file as instructed in the [Android Push Notification Guide](/developers/contribute/more-info/mobile/push-notifications/android) before you build the app.
## Build the mobile app
Once all the previous steps are done, execute the following command from within the project's directory:
```sh
$ npm run build:android
```
This will start the build process following the environment variables you've set. Once it finishes, it will create the `.apk` file(s) with the `APP_NAME` as the filename in the project's root directory. If you have not set Fastlane to submit the app to the Play Store, you can use this file to manually publish and distribute the app.
## Frequently Asked Questions
### How do I update the lock file?
We use lockfiles to lock dependencies and make sure the builds are reproductible. If we want to update the lockfile to update all dependencies to the latest, we can run these commands:
```
cd android
./gradlew app:dependencies --update-locks "*:*"
```
In case we want to regenerate the lockfile from the scratch, we can delete the `android/buildscript-gradle.lockfile` and then run the following commands:
```
cd android
./gradlew app:dependencies --write-locks
```

View File

@@ -0,0 +1,27 @@
---
title: "Build your own mobile app"
sidebar_position: 2
---
You can build the app from source and distribute it within your team or company either using the App Stores, Enterprise App Stores or EMM providers, or another way of your choosing.
At Mattermost, we build and deploy the Apps using a CI pipeline. The pipeline has different jobs and steps that run on specific contexts based on what we want to accomplish. You can check it out [here](https://github.com/mattermost/mattermost-mobile/blob/main/.github/workflows).
As an alternative we've also created a set of **scripts** to help automate build tasks. Learn more about the scripts by reviewing the [package.json](https://github.com/mattermost/mattermost-mobile/blob/master/package.json) file.
<Note title="Note">
By using the **scripts**, [Fastlane](https://docs.fastlane.tools/#choose-your-installation-method) and other dependencies will be installed in your system.
</Note>
- [Build the Android app](/developers/contribute/more-info/mobile/build-your-own/android)
- [Build the iOS app](/developers/contribute/more-info/mobile/build-your-own/ios)
### Push notifications with your own mobile app
When building your own Mattermost mobile app, you will also need to host the [Mattermost Push Notification Service](https://github.com/mattermost/mattermost-push-proxy) in order to receive push notifications.
See [Setup Push Notifications](/developers/contribute/more-info/mobile/push-notifications) for more details.

View File

@@ -0,0 +1,91 @@
---
title: "Build the iOS mobile app"
sidebar_position: 2
---
At times, you may want to build your own Mattermost mobile app. The most common use cases are:
* To white label the Mattermost mobile app.
* To use your own deployment of the Mattermost Push Notification Service (always required if you are building your own version of the mobile app).
# Build preparations
### 1. Prerequisites
The Mattermost mobile app for iOS needs to be built on a macOS computer with Xcode and the Xcode command line tools installed.
```sh
$ xcode-select --install
```
### 2. Bundle ID and entitlements
* Follow the steps 1, 2, and 3 for [Run on iOS Devices](/developers/contribute/more-info/mobile/developer-setup/run#run-on-ios-devices) in the Developer Setup.
* After configuring the app in the previous step, **ensure** the bundle ID for each target of the mobile app remains the same as the one in the original [mattermost-mobile GitHub repository](https://github.com/mattermost/mattermost-mobile) (`com.mattermost.rnbeta`, `com.mattermost.rnbeta.MattermostShare`, and `com.mattermost.rnbeta.NotificationService`).
### 3. Code sign
Apple requires all apps to be digitally signed with a certificate before they can be installed.
The build script will make use of [Match](https://docs.fastlane.tools/actions/match/) to sync your provisioning profiles (the profiles will be created for you if needed). The provisioning profiles will be created based on the environment variables.
### 4. Configure environment variables
To make it easier to customize your build, we've defined a few environment variables that are going to be used by Fastlane during the build process.
| Variable | Description | Default | Required |
|-----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|----------|
| `COMMIT_CHANGES_TO_GIT` | Should the fastlane script ensure that there are no changes to Git before building the app and that every change made during the build is committed back to Git.<br/><br/>Valid values are: `true`, `false` | `false` | No |
| `BRANCH_TO_BUILD` | Defines the Git branch that is going to be used for generating the build. <br/><br/>**Make sure that, if this value is set, the branch it is set to exists**. | `$GIT_BRANCH` | No |
| `GIT_LOCAL_BRANCH` | Defines the local branch to be created from BRANCH\_TO\_BUILD to ensure the base branch does not get any new commits on it.<br/><br/>**Make sure a branch with this name does not yet exist in your local git**. | build | No |
| `RESET_GIT_BRANCH` | Defines if, once the build is done, the branch should be reset to the initial state before building and whether to also delete the branch created to build the app. <br/><br/>Valid values are: `true`, `false` | `false` | No |
| `VERSION_NUMBER` | Set the version of the app at build time to a specific value, rather than using the one set in the project. | | No |
| `INCREMENT_VERSION_NUMBER_MESSAGE` | Set the commit message when changing the app version number. | Bump app version number to | No |
| `INCREMENT_BUILD_NUMBER` | Defines if the app build number should be incremented.<br/><br/>Valid values are: `true`, `false` | `false` | No |
| `BUILD_NUMBER` | Set the build number of the app at build time to a specific value, rather than incrementing the last build number. | | No |
| `INCREMENT_BUILD_NUMBER_MESSAGE` | Set the commit message when changing the app build number. | Bump app build number to | No |
| `APP_NAME` | The name of the app as it is going to be shown in the device home screen. | Mattermost Beta | Yes |
| `APP_SCHEME` | The URL naming scheme for the app as used in direct deep links to app content from outside the app. | mattermost | No |
| `REPLACE_ASSETS` | Override the assets as described in [White Labeling](/developers/contribute/more-info/mobile/build-your-own/white-label).<br/><br/>Valid values are: `true`, `false` | `false` | No |
| `MAIN_APP_IDENTIFIER` | The bundle identifier for the app. | | Yes |
| `BUILD_FOR_RELEASE` | Defines if the app should be built in release mode. <br/><br/>Valid values are: `true`, `false` <br/><br/>**Make sure you set this value to true if you plan to submit this app to TestFlight, the Apple App Store or distribute it in any other way**. | `false` | Yes |
| `NOTIFICATION_SERVICE_IDENTIFIER` | The bundle identifier for the notification service extension. | | Yes |
| `EXTENSION_APP_IDENTIFIER` | The bundle identifier for the share extension. | | Yes |
| `FASTLANE_TEAM_ID` | The ID of your Apple Developer Portal Team. | | Yes |
| `IOS_ICLOUD_CONTAINER` | The iOS iCloud container identifier used to support iCloud storage. | | Yes |
| `IOS_APP_GROUP` | The iOS App Group identifier used to share data between the app and the share extension. | | Yes |
| `SYNC_PROVISIONING_PROFILES` | Should we run **match** to sync the provisioning profiles. **Note**: Not syncing the provisioning profiles, will cause the singing to fail. Valid values are: `true`, `false` | `false` | Yes |
| `MATCH_USERNAME` | Your Apple ID Username. | | Yes |
| `MATCH_PASSWORD` | Your Apple ID Password. | | Yes |
| `MATCH_KEYCHAIN_PASSWORD` | Your Mac user password used to install the certificates in the build computer KeyChain. | | No |
| `MATCH_GIT_URL` | URL to the Git repo containing all the certificates. <br/><br/> **Make sure this Git repo is set to private. Remember this repo will be used to sync the provisioning profiles and other certificates**. | | Yes |
| `MATCH_APP_IDENTIFIER` | The Bundle Identifiers for the app (comma-separated).<br/><br/>**List the identifiers for each target of the app**. | for example:<br/>`com.mattermost.rnbeta`, <br/>`com.mattermost.rnbeta.MattermostShare`, <br/>`com.mattermost.rnbeta.NotificationService` | Yes |
| `MATCH_TYPE` | Define the provisioning profile type to sync. Valid values are: `appstore`, `adhoc`, `development`, `enterprise` <br/><br/>**Make sure you set this value to the same type as the `IOS_BUILD_EXPORT_METHOD` as you want to have the same provisioning profiles installed in the machine so they are found when signing the app**. | `adhoc` | Yes |
| `SUBMIT_IOS_TO_TESTFLIGHT` | Submit the app to TestFlight once the build finishes. Valid values are: `true`, `false` | `false` | No |
| `PILOT_USERNAME` | Your Apple ID Username used to deploy the app to TestFlight. | | No |
| `PILOT_SKIP_WAITING_FOR_BUILD_PROCESSING` | Do not wait until TestFlight finishes processing the app.<br/><br/>Valid values are: `true`, `false` | `true` | No |
---
<Note title="Note">
To configure your variables create the file `./mattermost-mobile/fastlane/.env` where `.env` is the filename. You can find the sample file `env_vars_example` [here](https://github.com/mattermost/mattermost-mobile/blob/master/fastlane/env_vars_example).
</Note>
---
## Build the mobile app
Once all the previous steps are complete, execute the following command from within the project's directory:
```sh
$ npm run build:ios
```
This will start the build process following the environment variables you've set. Once it finishes, it will create an `.ipa` file with the `APP_NAME` as the filename in the project's root directory. If you have not set Fastlane to submit the app to TestFlight, you can use this file to manually publish and distribute the app.
# Troubleshooting
## I keep receiving `Invalid username and password combination.` but the user and password are correct
Apple IDs must be lowercase. A username like "Example@icloud.com" may not work properly, while "example@icloud.com" will. Also ensure you have recently changed your Apple ID password. "Old" passwords may be blocked by Apple when not connecting through a browser, so Apple may block Fastlane. Resetting your password may solve this issue.

View File

@@ -0,0 +1,57 @@
---
title: "Enable SSL Pinning certificates"
sidebar_position: 2
---
##### What is SSL Pinning?
SSL (Secure Sockets Layer) pinning is a technique used in mobile app development to ensure that the app communicates only with a server that has a specific certificate. This is done by embedding the server’s certificate in the app itself and then validating the server’s certificate against this embedded certificate during communication. If the server's certificate does not match the pinned certificate, the connection is rejected.
##### Advantages of SSL Pinning
1. **Increased Security**: Protects against man-in-the-middle (MITM) attacks by ensuring that the app only communicates with trusted servers.
2. **Trustworthiness**: Guarantees that the data sent and received is from the expected server.
3. **Prevention of Certificate Spoofing**: Ensures that the server’s certificate is exactly what is expected, preventing spoofing attempts.
##### Disadvantages of SSL Pinning
1. **Certificate Management**: Requires regular updates to the app when the server’s certificate is renewed or changed.
2. **Deployment Complexity**: Coordination between development and deployment teams is necessary to avoid disruptions during certificate rotations.
3. **Maintenance Overhead**: Adds additional steps and complexity to the app’s maintenance process.
<Note title="Important Note">
SSL pinning requires that both development and deployment teams understand and follow best practices for cryptographic key management, certificate rotation, and incident response.
- Coordinating the timing of certificate updates and app updates is crucial to minimize impact on end-users. When the server's SSL certificate is renewed or rotated, the hardcoded public key in the app no longer matches the server's new certificate, leading to connection failures until the app is updated with the new key.
- Both development and deployment teams need to align on a deployment window that considers factors like user downtime, mobile app store review timelines, and peak usage times, as well as a coordinated rollback plan.
</Note>
### Steps to Enable SSL Pinning in Your Mobile App
#### 1. Obtain the Certificate from the Server
Use `openssl` to retrieve the certificate from your server and save it to a file. This can be done with the following command:
```sh
openssl s_client -connect yourserver.com:443 -showcerts < /dev/null | openssl x509 -outform DER -out yourserver.cer
```
Alternatively, to save it in PEM format:
```sh
openssl s_client -connect yourserver.com:443 -showcerts < /dev/null | openssl x509 -outform PEM -out yourserver.crt
```
#### 2. Naming the Certificate Files
Name the certificate files using the domain name as the filename with either `.cer` or `.crt` as the extension. For example, if your server’s domain is `example.com`, your files should be named `example.com.cer` and/or `example.com.crt`.
Optionally you can have both file types (`.cer` and `.crt`) to match the server trust and to ensure continued app functionality during certificate rotations. **Coordinate certificate rotations with the deployment teams** to avoid disruptions between the app and the server.
#### 3. Copy the Certificate Files to the Assets Folder
Place the certificate files in the `assets/certs` folder of your project. This is necessary for the app to access and use the certificates during runtime.
#### 4. Build Your App
Follow the instructions in the [Build the iOS app](/developers/contribute/more-info/mobile/build-your-own/ios) or [Build the Android app](/developers/contribute/more-info/mobile/build-your-own/android) sections to build your app with SSL pinning enabled.

View File

@@ -0,0 +1,69 @@
---
title: "White label"
sidebar_position: 3
---
We've made it easy to white label the mobile app and to replace and override the assets used, however, you have to [Build Your Own App](/developers/contribute/more-info/mobile/build-your-own) from source.
If you look at the [Project Folder Structure](/developers/contribute/more-info/mobile/developer-setup/structure), you'll see that there is an assets folder containing a base folder with assets provided by Mattermost. These include localization files and images as well as a release folder that optionally contains the icons and the splash screen of the app when building in release mode.
To replace these with your own assets, create a sub-directory called `override` in the `assets` folder. The assets that you add using the same directory structure and file names as in the `base` directory, will be used instead of the original ones.
### Localization strings
To replace these with your own assets, create a sub-directory called `override` in the `assets` folder. Using the same directory structure and file names as in the `base` directory, you can add assets to the override folder to be used instead.
For example, to override `assets/base/images/logo.png` you would replace your own `logo.png` file in `assets/override/images/logo.png`.
### Images
To replace an image, copy the image to `assets/override/images/` with the same location and file name as in the `base` folder.
---
<Note title="Note">
Make sure the images have the same height, width, and DPI as the images that you are overriding.
</Note>
---
### App splash screen and launch icons
In the `assets` directory you will find a folder named `assets/base/release` which contains an `icons` folder and a `splash_screen` folder under each platform directory.
Copy the full `release` directory under `assets/override/release` and then replace each image with the same name. Make sure you replace all the icon images for the platform you are building the app - the same applies to the splash screen.
The splash screen's background color is white by default and the image is centered. If you need to change the color or the layout to improve the experience of your new splash screen make sure that you also override the file `launch_screen.xml` for Android and `LaunchScreen.storyboard` for iOS. Both can be found under `assets/base/release/splash_screen/<platform>/`.
Splash screen and launch icons assets are replaced at build time when the environment variable `REPLACE_ASSETS` is set to true (default is false).
---
<Note title="Note">
Make sure the images have the same height, width, and DPI as the images that you are overriding.
</Note>
---
### Configuration
The `config.json` file handles custom configuration for the app for settings that cannot be controlled by the Mattermost server. Like with localization strings, create a `config.json` file under `assets/override` and just include the keys and values that you wish to change that are present in `assets/base/config.json`.
For example, if you want the app to automatically provide a server URL and skip the screen to input it, you would add the following to `assets/override/config.json`:
```json
{
"DefaultServerUrl": "http://192.168.0.13:8065",
"AutoSelectServerUrl": true
}
```
---
<Note title="Note">
The above key/value pairs are taken from the original `config.json` file. Since we don’t need to change anything else, we only included these two settings.
</Note>
---