-
-
Notifications
You must be signed in to change notification settings - Fork 107
Building Monal
- CocoaPods (see below how to install properly!!)
- Rust (see https://www.rust-lang.org/tools/install)
- Xcode (only runs on macOS, see below if you don't own a Mac)
- git
- clone repo
git clone https://github.com/monal-im/Monal.git
cd Monal
- init and update submodules (localizations)
git submodule update --init --recursive
- build rust libs (see Setting up RUST below)
bash rust/build-rust.sh
- install dependencies (see below how to install cocoapods properly!!)
cd Monal
pod install --repo-update
- open in Xcode
open Monal.xcworkspace
-
Add
LibMonalRustSwiftBridge
as a local project, if not present: In Xcode, go toFile -> Add packages... -> Add local
, select therust/LibMonalRustSwiftBridge
directory under Monal's source tree. Make sure that Monal is selected inAdd to project
and the selected target ismonalxmpp
and finally add the package. -
Build :)
Read here how to use logging with the Monal UDP Logger to debug things.
If you are interested in building Monal but don't have a Mac you can virtualize:
- MacOS Bis Sur (old buildserver)
- MacOS Catalina (used for oldold buildserver)
- Alternative 1
- Alternative 2
- Alternative 3
- Mac OS Beta ISO as well as the free preview image
Direct download links to all XCode versions If you want to connect your physical iPhone to XCode inside your VM, use this (tested by Monal devs)
If you want to live on the edge and use all new bleeding-edge features that just got implemented, you can use the alpha builds of Monal, too.
Just sent the UDID of your device (the serial number visible via lsusb
on a Linux system) to [email protected]. Once your device has been added, you can download and install the build. For each new commit to the develop branch a new build will go down the pipeline.
Please be reminded that the alpha builds obviously might be unstable, slower or come with other severe issues.
Read here how to use logging with the Monal UDP Logger to debug things.
You'll need to use homebrew to install cocoapods, other ways to install cocoapods may result in strange errors.
Go to https://brew.sh/ and follow the instructions to install homebrew.
Don't forget to follow the "next steps" printed to your terminal once homebrew finishes.
In the terminal type brew install cocoapods
- Install rustup by running
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
as mentioned in https://www.rust-lang.org/tools/install - Assuming we're in monal's source directory, run
chmod +x rust/build-rust.sh
to make the script executable - Assuming we're in monal's source directory, run
rust/build-rust.sh
to build our rust lib. If the following error pops up, follow the first answer here: https://stackoverflow.com/questions/68565356/xcrun-error-sdk-iphoneos-cannot-be-located
error: failed to get iphoneos SDK path: process exit with error: xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'