kChat is a fork of Mattermost mobile adapted for use within the Infomaniak ecosystem.
- Minimum Server versions: Current ESR version (10.5.0+)
- Supported iOS versions: 15.1+
- Supported Android versions: 7.0+
While the mobile app is a fork of Mattermost, the back-end is custom made and entierely developped by Infomaniak.
The kChat app requires an Infomaniak account with kSuite. It enables you to communicate live with your teams and organise your projects within a unified communication platform.
- Install brew on your machine
- Install open jdk (see instructions in the following section)
- Install a ruby version manager such as rbenv (https://formulae.brew.sh/formula/rbenv) or rvm (https://rvm.io/)
- Make sure that xcode & xcode command line tools is installed and up to date.
- Android studio must be installed & configured
- Make sure to install cocoapods package installed using
brew install cocoapods - Whitelist this path
/Users/{username}/Library/Developer/Xcode/DerivedDatawithin your simulator to avoid simulator errors
- Run the command
brew install openjdk@17 - Then run those commands to update your PATH :
sudo ln -sfn /opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk # Create a symlink so that your java wrappers can find this jdk
echo 'export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"' >> ~/.zshrc
export CPPFLAGS="-I/opt/homebrew/opt/openjdk@17/include"
- Install the right node version using
nvm installcommand ornvm useif already installed - Run the command
npm install(This will install node_modules & pods) - Run
npm run build:ios-simto launch your app
- To avoid errors related to the Infomaniak font, you can run the shell command
npm run font-download - Run
npm start
If this error occur, make sure that android studio has been completely installed and that those following lines are set within your .zprofile :
export ANDROID_HOME="/Users/<username>/Library/Android/sdk"
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/emulator
git config --global user.email [email protected]
brew install watchman
Open xcode and select Xcode > Settings > Locations and make sure that the dropdown "command line tools" is correctly set.
Install Ruby by running PKG_CONFIG_PATH=/opt/homebrew/opt/[email protected]/lib/pkgconfig rvm reinstall 3.2.0 --with-openssl-lib=/opt/homebrew/opt/[email protected] --with-openssl-include=/opt/homebrew/opt/[email protected]
If you wish to contribute code to the Mattermost base repository to fix issues or add new features, follow these steps:
Before you begin, ensure you have:
- A valid GitHub account.
- Been added to the Infomaniak GitHub group.
-
First, add two remote repositories to your local GitHub folder using the following commands:
git remote add upstream https://github.com/mattermost/mattermost-mobile.git(used to pull the latest changes from upstream)git remote add fork https://github.com/Infomaniak/mobile-kchat.git(used to create the PR onto upstream)
-
Next, pull the main upstream branch to ensure you have the latest changes from upstream.
-
Once you have cloned the upstream branch in your projects, switch to this branch using
git checkout {name of the branch}. -
Create your own local branch from the upstream branch using
git checkout -b {name of the branch}. -
After applying your changes, push them to the remote fork to create a PR on Mattermost using
git push fork {name of the branch}. -
Follow the PR instructions to provide Mattermost with the necessary information to review your code thoroughly.
In the android/ folder, you can use something like that to pull the db from the android simulator and then use any sqlite viewer. Note: Android App inspector seems to not be able to open the db directly, even if the documentation says so
# recup l'id de la db, par exemple en log ce path ou en cherchant dans le device
# app/database/manager/index.ts#L172
# ou
# /files/databases
# Variables
APP_ID="com.infomaniak.chat"
FILENAME="aHR0cHM6Ly9pbmZvbWFuaWFrLmtjaGF0LmluZm9tYW5pYWsuY29t.db"
DEST="./extracted.db"
# Extraction via run-as
adb exec-out run-as $APP_ID cat files/databases/$FILENAME > $DEST-
Go to simulators folder
cd ~/Library/Developer/CoreSimulator/Devices
-
Find the booted simulator
xcrun simctl list devices | grep Booted→ Note the simulator UUID.
-
Locate the DB file
The database is stored in:./<SIMULATOR_UDID>/data/Containers/Shared/AppGroup/<APP_GROUP_UUID>/databases/<encoded_url>.dbThe name is Base64 URL-safe encoded from the server URL (see
urlSafeBase64Encode(serverUrl)inapp/database/manager/index.ts). -
Decode to identify the server
echo "aHR0cHM6Ly9leGFtcGxlLmNvbQ==" | base64 -d # Output: https://example.com
-
Copy and open
cp "./<path>/databases/<encoded_url>.db" ~/Desktop/db-debug.db
Open
db-debug.dbwith DB Browser for SQLite.
The Jitsi SDK is included as raw .ts/.tsx files in node_modules, not pre-compiled. It contains TypeScript errors — harmless at runtime but blocking during build.
We add a script that automatically adds // @ts-nocheck to all Jitsi SDK files to disable type checking only for these files.
This is executed via:
"postinstall": "patch-package && ./scripts/postinstall.sh && node ./scripts/jitsi-ts-nocheck.js"➡️ Runs automatically on npm install.
This workaround stays until Jitsi provides a properly compiled SDK.