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
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:
@@ -0,0 +1,31 @@
|
||||
---
|
||||
title: "Add new dependencies"
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
If you need to add a new dependency to the project, it is important to add them in the right way. Instructions for adding different types of dependencies are described below.
|
||||
|
||||
#### JavaScript only
|
||||
|
||||
If you need to add a new JavaScript dependency that is not related to React Native, **use npm, not yarn**. Be sure to save the exact version number to avoid conflicts in the future.
|
||||
|
||||
```sh
|
||||
$ npm i --save-exact <package-name>
|
||||
```
|
||||
|
||||
If the dependency is only for development
|
||||
```sh
|
||||
$ npm i --save-exact --save-dev <package-name>
|
||||
```
|
||||
|
||||
#### React Native
|
||||
|
||||
As with [JavaScript only](#javascript-only), **use npm** to add your dependency and include an exact version.
|
||||
|
||||
If the library contains iOS native code, make sure to run:
|
||||
|
||||
```sh
|
||||
$ npm run pod-install
|
||||
```
|
||||
|
||||
Most of the time linking the library to React Native is done automatically, but at times some libraries need to be manually linked. In this case follow the library's documentation.
|
||||
@@ -0,0 +1,278 @@
|
||||
---
|
||||
title: "Developer setup for Mattermost mobile apps"
|
||||
description: "Set up a development environment for the React Native Mattermost mobile apps for iOS and Android."
|
||||
sidebar_label: "Developer setup"
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
The following instructions apply to the mobile apps for iOS and Android built in React Native.
|
||||
Download the iOS version [here](https://apps.apple.com/us/app/mattermost/id1257222717) and the Android version [here](https://play.google.com/store/apps/details?id=com.mattermost.rn).
|
||||
Source code can be found at the [GitHub Mattermost Mobile app repository](https://github.com/mattermost/mattermost-mobile).
|
||||
|
||||
If you run into any issues getting your environment set up, check the [Troubleshooting](https://docs.mattermost.com/deploy/mobile-troubleshoot.html) section of the product docs for common solutions.
|
||||
|
||||
|
||||
<Note title="iOS mobile app">
|
||||
A macOS computer is required to build the Mattermost iOS mobile app.
|
||||
</Note>
|
||||
|
||||
|
||||
|
||||
<Note title="Android mobile app">
|
||||
Version 17 of the Java SE Development Kit (JDK) is required to develop the Mattermost Android mobile app. You can download the latest OpenJDK release of Java from Oracle, for free, under an open source license.
|
||||
</Note>
|
||||
|
||||
|
||||
## Environment setup
|
||||
|
||||
The following instructions apply to both iOS and Android mobile apps.
|
||||
On macOS, we recommend using [Homebrew](https://brew.sh) as a package manager.
|
||||
|
||||
### Install NodeJS and NPM
|
||||
|
||||
We recommend using NodeJS v22 and npm v10. Many of our team use [nvm](https://github.com/nvm-sh/nvm) to manage npm and NodeJS versions.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="node-npm-mac" label="macOS">
|
||||
To install [NVM](https://github.com/nvm-sh/nvm), follow [these instructions](https://github.com/nvm-sh/nvm#installing-and-updating).
|
||||
|
||||
After installing, follow the post-install steps shown by the installer to add the necessary lines to your shell profile (for example `~/.zshrc` or `~/.bash_profile`). Then open a new terminal and run:
|
||||
|
||||
```sh
|
||||
nvm install --lts
|
||||
```
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="node-npm-linux" label="Linux">
|
||||
There are three available options for installing NodeJS on Linux:
|
||||
|
||||
- Using NVM by following the instructions [here](https://github.com/nvm-sh/nvm#install-script).
|
||||
- Install using your distribution's package manager.
|
||||
- Download and install the package from the [NodeJS website](https://nodejs.org/en).
|
||||
|
||||
<Note>
|
||||
The version of NodeJS that your distribution's package manager supports may not be the recommended version to build Mattermost mobile apps.
|
||||
Please make sure that NodeJS installed by the package manager is at the recommended version.
|
||||
</Note>
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
### Install Watchman
|
||||
|
||||
[Watchman](https://facebook.github.io/watchman) is a file watching program.
|
||||
When a file changes, Watchman triggers an action, such as re-running a build command if a source file has changed.
|
||||
|
||||
The minimum required version of Watchman is 4.9.0.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="watchman-mac" label="macOS">
|
||||
To install Watchman using Homebrew, open a terminal and execute:
|
||||
|
||||
```sh
|
||||
brew install watchman
|
||||
```
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="watchman-linux" label="Linux">
|
||||
Download the latest package from [here](https://github.com/facebook/watchman/releases).
|
||||
|
||||
<Note title="Inotify limits">
|
||||
Note that you need to increase your `inotify` limits for Watchman to work properly.
|
||||
</Note>
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
### Install `react-native-cli` tools
|
||||
|
||||
```sh
|
||||
npm -g install react-native-cli
|
||||
```
|
||||
|
||||
### Install Git
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="git-mac" label="macOS">
|
||||
To install Git using Homebrew, open a terminal and execute:
|
||||
|
||||
```sh
|
||||
brew install git
|
||||
```
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="git-linux" label="Linux">
|
||||
Some distributions come with Git preinstalled but you'll most likely have to install it yourself. For most distributions the package is simply called `git`.
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Additional setup for iOS (macOS)
|
||||
|
||||
### Install XCode
|
||||
|
||||
Install [Xcode](https://apps.apple.com/us/app/xcode/id497799835?ls=1&mt=12) to build and run the app on iOS. The minimum required version is 11.0.
|
||||
|
||||
### Install Ruby
|
||||
|
||||
A version of Ruby is automatically installed on macOS, but Mattermost React Native app development requires the Ruby version pinned in the repository's `.ruby-version` file (currently 3.2.11). You can check the current version of Ruby by running the following command.
|
||||
```sh
|
||||
ruby --version
|
||||
```
|
||||
|
||||
If it isn't, we recommend using [Ruby Version Manager](https://rvm.io) or your preferred package manager to install the required version. The steps below are for using RVM.
|
||||
|
||||
1. Install the GPG keys for RVM using the command found [here](https://rvm.io/rvm/install#install-gpg-keys).
|
||||
1. If you don't have the `gpg` command, you can install it using Homebrew by running.
|
||||
```sh
|
||||
brew install gnupg
|
||||
```
|
||||
2. Install the stable version of RVM using the following command.
|
||||
```sh
|
||||
\curl -sSL https://get.rvm.io | bash -s stable --ruby
|
||||
```
|
||||
3. To load RVM, either open a new terminal or run the following command.
|
||||
```sh
|
||||
source ~/.rvm/scripts/rvm
|
||||
```
|
||||
4. Install the required version of Ruby
|
||||
```sh
|
||||
rvm install 3.2.11
|
||||
```
|
||||
5. (Optional) If you don't need to use a different version of Ruby for anything else, you'll want to change the default version of Ruby. Without this, you'll need to run `rvm use 3.2.11` any time you want to work on the mobile app.
|
||||
```sh
|
||||
rvm alias create default 3.2.11
|
||||
```
|
||||
|
||||
:::note[Apple Silicon]
|
||||
On recent Apple Silicon Macs, installing Ruby through RVM can fail with repeated OpenSSL errors. If you hit those, [`rv`](https://github.com/spinel-coop/rv) (a Ruby version manager) is a reliable alternative:
|
||||
|
||||
```sh
|
||||
brew install rv
|
||||
rv ruby install 3.2.11
|
||||
```
|
||||
|
||||
To have `rv` switch Ruby versions automatically, install its shell integration once. For example, for `zsh`:
|
||||
|
||||
```sh
|
||||
echo 'eval "$(rv shell init zsh)"' >> ~/.zshrc
|
||||
```
|
||||
|
||||
Run `rv shell <your-shell>` (`bash`, `fish`, etc.) to see the equivalent for your shell, then open a new terminal. After that, `rv` reads the repository's `.ruby-version` file and selects the pinned version automatically when you `cd` into the project.
|
||||
:::
|
||||
|
||||
## Additional setup for Android
|
||||
|
||||
### Download and install Android Studio or Android SDK CLI tools
|
||||
|
||||
Download and install the [Android Studio app or the Android SDK command line tools](https://developer.android.com/studio/index.html#downloads)
|
||||
|
||||
|
||||
<Note title="Default paths">
|
||||
This documentation assumes you chose the default path for your Android SDK installation. If you chose a different path, adjust the environment variables below accordingly.
|
||||
</Note>
|
||||
|
||||
|
||||
#### Environment variables
|
||||
|
||||
Make sure you have the following environment variables configured for your platform:
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="droid-common" label="All platforms">
|
||||
- Set `ANDROID_HOME` to where Android SDK is located (likely `/Users/<username>/Library/Android/sdk` or `/home/<username>/Android/Sdk`)
|
||||
- Make sure your `PATH` includes `ANDROID_HOME/tools` and `ANDROID_HOME/platform-tools`
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="droid-mac" label="macOS">
|
||||
On Mac, this usually requires adding the following lines to your `~/.bash_profile` file:
|
||||
|
||||
```sh
|
||||
export ANDROID_HOME=$HOME/Library/Android/sdk
|
||||
export PATH=$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$PATH
|
||||
```
|
||||
|
||||
Then reload your bash configuration:
|
||||
|
||||
```sh
|
||||
source ~/.bash_profile
|
||||
```
|
||||
|
||||
|
||||
<Note>
|
||||
Depending on the shell you're using, this might need to be put into a different file such as `~/.zshrc`. Adjust this accordingly.
|
||||
</Note>
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="droid-linux" label="Linux">
|
||||
On Linux the home folder is located under `/home/<username>` which results in a slightly different path:
|
||||
|
||||
```sh
|
||||
export ANDROID_HOME=/home/<username>/Android/Sdk
|
||||
export PATH=$ANDROID_HOME/platform-tools:$PATH
|
||||
export PATH=$ANDROID_HOME/tools:$PATH
|
||||
```
|
||||
|
||||
Then reload your configuration
|
||||
|
||||
```sh
|
||||
source ~/.bash_profile
|
||||
```
|
||||
|
||||
|
||||
<Note>
|
||||
Depending on the shell you're using, this might need to be put into a different file such as `~/.zshrc`. Adjust this accordingly.
|
||||
</Note>
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
### Install the SDKs and SDK tools
|
||||
|
||||
In the SDK Manager using Android Studio or the [Android SDK command line tool](https://developer.android.com/studio/command-line/sdkmanager.html), ensure the following are installed:
|
||||
|
||||
- SDK Tools (you may have to select **Show Package Details** to expand packages):
|
||||
- Android SDK Build-Tools 31
|
||||
- Android Emulator
|
||||
- Android SDK Platform-Tools
|
||||
- Android SDK Tools
|
||||
- Google Play services
|
||||
- Intel x86 Emulator Accelerator (HAXM installer)
|
||||
- Support Repository
|
||||
- Android Support Repository
|
||||
- Google Repository
|
||||
|
||||

|
||||
|
||||
- SDK Platforms (you may have to select **Show Package Details** to expand packages)
|
||||
- Android 12 or above
|
||||
- Google APIs
|
||||
- SDK Platform
|
||||
- Android SDK Platform 31 or above
|
||||
- Intel or Google Play Intel x86 Atom\_64 System Image
|
||||
- Any other API version that you want to test
|
||||
|
||||

|
||||
|
||||
## Obtain the source code
|
||||
|
||||
In order to develop and build the Mattermost mobile apps, you'll need to get a copy of the source code. Forking the `mattermost-mobile` repository will also make it easy to contribute your work back to the project in the future.
|
||||
|
||||
1. Fork the [mattermost-mobile](https://github.com/mattermost/mattermost-mobile) repository on GitHub.
|
||||
|
||||
2. Clone your fork locally:
|
||||
|
||||
a. Open a terminal
|
||||
|
||||
b. Change to a directory you want to hold your local copy
|
||||
|
||||
c. Run `git clone https://github.com/<username>/mattermost-mobile.git` if you want to use HTTPS, or `git clone git@github.com:<username>/mattermost-mobile.git` if you want to use SSH
|
||||
|
||||
|
||||
<Note>
|
||||
`<username>` refers to the username or organization in GitHub that forked the repository
|
||||
</Note>
|
||||
|
||||
|
||||
3. Change the directory to `mattermost-mobile`.
|
||||
|
||||
```sh
|
||||
cd mattermost-mobile
|
||||
```
|
||||
|
||||
4. Install the project dependencies with `npm install`
|
||||
@@ -0,0 +1,123 @@
|
||||
---
|
||||
title: "Run the mobile app"
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
We provide a set of scripts to help you run the app for the different platforms that are executed with `npm`:
|
||||
|
||||
* **npm start**: Start the React Native packager. The packager has to be running in order to build the JavaScript code that powers the app.
|
||||
* **npm run android**: Compile and run the mobile app on Android.
|
||||
* **npm run ios**: Compile and run the mobile app on iOS.
|
||||
|
||||
|
||||
<Note>
|
||||
To speed up development, only compile and run the apps in the following cases:
|
||||
- You have not deployed the app to a device or simulator with the `npm run <platform>` command.
|
||||
- There have been changes in the native code.
|
||||
- A new library has been added or updated that has native code.
|
||||
|
||||
If none of the above cases apply, you could just simply start the React Native packager with `npm start` and launch the app you have already deployed to the device or simulator.
|
||||
</Note>
|
||||
|
||||
|
||||
The above commands are shortcuts for the `react-native` CLI. You can append `-- --help` to the above commands to see available options, for example:
|
||||
|
||||
```sh
|
||||
npm run android -- --help
|
||||
```
|
||||
|
||||
Make sure you are adding `--` before the options you want to include or run the `react-native` CLI directly:
|
||||
|
||||
```sh
|
||||
npx react-native run-android --help
|
||||
```
|
||||
|
||||
## Run on a device
|
||||
|
||||
By default, running the app will launch an Android emulator (if you created one) or an iOS simulator.
|
||||
|
||||
If you want to test the performance of the app or if you want to make a contribution it is always a good idea to run the app on an actual device.
|
||||
This will let you ensure that the app is working correctly and in a performant way before submitting a pull request.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="mobile-android" label="Android">
|
||||
To be able to run the app on an Android device you'll need to follow these steps:
|
||||
|
||||
1. **Enable debugging over USB**
|
||||
|
||||
Most Android devices can only install and run apps downloaded from Google Play by default. In order to be able to install the Mattermost Mobile app in the device during development you will need to enable USB Debugging on your device in the **Developer options** menu by going to **Settings > About phone** and then tap the Build number row at the bottom seven times, then go back to **Settings > Developer options** and enable **USB debugging**.
|
||||
|
||||
2. **Plug in your device via USB**
|
||||
|
||||
Plug in your Android device in any available USB port in your development machine (try to avoid hubs and plug it directly into your computer) and check that your device is properly connecting to ADB (Android Debug Bridge) by running `adb devices`.
|
||||
|
||||
```
|
||||
$ adb devices
|
||||
List of devices attached
|
||||
42006fb3e4fb25b8 device
|
||||
```
|
||||
|
||||
If you see **device** in the right column that means that the device is connected. You can have multiple devices attached and the app will be deployed to **all of them**.
|
||||
|
||||
3. **Compile and run**
|
||||
|
||||
With your device connected to the USB port execute the following in your command prompt to install and launch the app on the device:
|
||||
|
||||
```sh
|
||||
npm run android
|
||||
```
|
||||
|
||||
|
||||
<Note title="Note">
|
||||
If you don't see a bar at the top loading the JavaScript code then it's possible that the device is not connected to the development server. See [Using adb reverse](http://reactnative.dev/docs/running-on-device.html#method-1-using-adb-reverse-recommended).
|
||||
</Note>
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="mobile-ios" label="iOS">
|
||||
To be able to run the app on an iOS device you'll need to have [Xcode](https://developer.apple.com/xcode/) installed on a Mac computer and follow this steps:
|
||||
|
||||
1. **Get an Apple Developer account**
|
||||
|
||||
The apps that run on an iOS device must be signed. To sign it, you'll need a set of provisioning profiles. If you already have an Apple Developer account enrolled in the Apple Developer program you can skip this step. If you don't have an account yet you'll need to [create one](https://appleid.apple.com/account?appId=632&returnUrl=https%3A%2F%2Fdeveloper.apple.com%2Faccount%2F#!&page=create) and enroll in the [Apple Developer Program](https://developer.apple.com/programs/).
|
||||
|
||||
2. **Open the project in Xcode**
|
||||
|
||||
Navigate to the `ios` folder in your `mattermost-mobile` project, then open the file `Mattermost.xcworkspace` in Xcode.
|
||||
|
||||
3. **Configure code signing and capabilities**
|
||||
|
||||
Select the **Mattermost** project in the Xcode Project Navigator, then select the **Mattermost** target. Look for the **Signing & Capabilities** tab.
|
||||
|
||||
- Go to the **Signing** section and make sure your Apple developer account or team is selected under the Team dropdown and change the [Bundle Identifier](https://developer.apple.com/documentation/appstoreconnectapi/bundle_ids).
|
||||
Xcode will register your provisioning profiles in your account for the Bundle Identifier you've entered if it doesn't exist.
|
||||
- Go to the **App Groups** section and change the [App Groups](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_application-groups?language=objc).
|
||||
Xcode will register your AppGroupId and update the provision profile.
|
||||
- Go to the **iCloud** section and change the [Containers](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_icloud-container-identifiers?language=objc).
|
||||
Xcode will register your iCloud container and update the provision profile.
|
||||
- Go to the **Keychain Sharing** section and change the [Keychain Groups](https://developer.apple.com/documentation/bundleresources/entitlements/keychain-access-groups?language=objc).
|
||||
Xcode will register your Keychain access groups and update the provision profile.
|
||||
|
||||
|
||||
<Note title="Important">
|
||||
Repeat the steps for the `MattermostShare` and `NotificationService` targets. Each target must use a **different** *Bundle Identifier*.
|
||||
</Note>
|
||||
|
||||
|
||||
4. **Compile and run**
|
||||
|
||||
Plug in your iOS device in any available USB port in your development computer.
|
||||
|
||||
If everything is set up correctly, your device will be listed as the build target in the Xcode toolbar, and it will also appear in the Devices Pane (<kbd><kbd>⇧</kbd><kbd>⌘</kbd><kbd>2</kbd></kbd>). You can press the **Build and run** button (<kbd><kbd>⌘</kbd><kbd>R</kbd></kbd>) or select **Run** from the Product menu to run the app.
|
||||
|
||||

|
||||
|
||||
As an alternative you can select the targeted device by opening the **Product** menu in Xcode menu bar, then go to **Destination** and look for your device to select from the list.
|
||||
|
||||
|
||||
<Note>
|
||||
If you run into any issues, please take a look at Apple's [Launching Your App on a Device](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/LaunchingYourApponDevices/LaunchingYourApponDevices.html#//apple_ref/doc/uid/TP40012582-CH27-SW4) documentation.
|
||||
If the app fails to build, go to the **Product** menu and select **Clean Build Folder** before trying to build the app again.
|
||||
Also, be sure that your iOS device is trusted so app deployments can proceed.
|
||||
</Note>
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
@@ -0,0 +1,56 @@
|
||||
---
|
||||
title: "Folder structure"
|
||||
sidebar_position: 1
|
||||
---
|
||||
The following is an overview of the Mobile app repository file structure:
|
||||
|
||||
```goat
|
||||
|
|
||||
+-- .circleci # Circle CI workflow to build the apps
|
||||
+-- .github # GitHub actions
|
||||
+-- .husky
|
||||
+-- android # Android specific code
|
||||
+-- app # React Native code
|
||||
| |
|
||||
| +-- actions
|
||||
| +-- client
|
||||
| +-- components
|
||||
| +-- constants
|
||||
| +-- context
|
||||
| +-- database
|
||||
| +-- helpers
|
||||
| +-- hooks
|
||||
| +-- i18n
|
||||
| +-- init
|
||||
| +-- managers
|
||||
| +-- notifications
|
||||
| +-- products
|
||||
| +-- queries
|
||||
| +-- screens
|
||||
| +-- store
|
||||
| +-- utils
|
||||
|
|
||||
+-- assets
|
||||
| |
|
||||
| +-- base
|
||||
| | |
|
||||
| | +-- i18n
|
||||
| | +-- images
|
||||
| | +-- release
|
||||
| +-- fonts
|
||||
|
|
||||
+-- build
|
||||
| |
|
||||
| +-- notice-file
|
||||
|
|
||||
+-- detox
|
||||
+-- docs
|
||||
+-- eslint
|
||||
+-- fastlane # Fastlane scripts to build the app
|
||||
+-- ios # iOS specific code
|
||||
+-- patches # Patches for various dependencies
|
||||
+-- scripts
|
||||
+-- share_extension # Android's share extension app
|
||||
+-- test
|
||||
+-- types
|
||||
```
|
||||
Reference in New Issue
Block a user