Improve README and INSTALL

This commit is contained in:
manuroe
2021-02-05 09:19:07 +01:00
parent 2a26379dda
commit 29784d89ff
2 changed files with 26 additions and 29 deletions

View File

@@ -60,43 +60,39 @@ If you want to build last development code you have to checkout the develop bran
- **Build specific branch of Kit and SDK and modify Element project only**
If you want to build a specific branch for the MatrixKit and the MatrixSDK you have to indicate them using a dictionary like this: `$matrixKitVersion = {'kit branch name' => 'sdk branch name'}`.
If you want to build a specific branch for the MatrixKit and the MatrixSDK you have to indicate them using a dictionary like this: `$matrixKitVersion = {'kit_branch_name' => 'sdk_branch_name'}`.
- **Build any branch and be able to modify MatrixKit and MatrixSDK locally**
If you want to modify MatrixKit and/or MatrixSDK locally and see the result in Element project you have to uncommment `$matrixKitVersion = :local` in the `Podfile`.
But before you have to checkout [MatrixKit](https://github.com/matrix-org/matrix-ios-kit) repository in `../matrix-ios-kit` and [MatrixSDK](https://github.com/matrix-org/matrix-ios-sdk) in `../matrix-ios-sdk` locally relatively to your Element iOS project folder.
Be sure to use compatible branches for Element iOS, MatrixKit and MatrixSDK. For example if you want to modify Element iOS from develop branch use MatrixKit and MatrixSDK develop branches and then make your modifications.
Be sure to use compatible branches for Element iOS, MatrixKit and MatrixSDK. For example, if you want to modify Element iOS from develop branch, use MatrixKit and MatrixSDK develop branches and then make your modifications.
**Important**: By working with local pods (development pods) you will need to use legacy build system in Xcode, to have your local changes taken into account. To enable it go to Xcode menu and select `File > Workspace Settings… > Build System` and then choose `Legacy Build System`.
### Modify `$matrixKitVersion` after installation of dependencies
### `$matrixKitVersion` Modification
Assuming you have already completed the **Install dependencies** instructions from **Build** section below.
Every time you change the `$matrixKitVersion` variable in the `Podfile`, you have to run the `pod install` command again.
Each time you edit `$matrixKitVersion` variable in the `Podfile` you will have to run the `pod install` command.
## Generate Xcode workspace
In order to get rid of git conflicts, the `Riot.xcodeproj` is not pushed into the git repository anymore but generated using `XcodeGen`. To generate the `xcodeproj` file simply run the following command line in the `Riot` folder:
```
$ cd Riot
$ xcodegen
```
**Note**: After the project file generation, the script `createWorkspace.sh` is called to generate the associated workspace (see **Install dependencies**).
## Build
## Generate Xcode project
In order to get rid of git conflicts, the `Riot.xcodeproj` is not pushed into the git repository anymore but generated using `XcodeGen`. To generate the `xcodeproj` file simply run the following command line from the root folder :
```
$ xcodegen
```
### Install dependencies
Before opening the Element Xcode workspace, you need to install dependencies via CocoaPods.
Then, before opening the Element Xcode workspace, you need to install dependencies via CocoaPods.
To be sure to use the right CocoaPods version you can use `bundler`:
```
$ cd Riot
$ bundle install
$ bundle exec pod install
```
@@ -104,19 +100,12 @@ $ bundle exec pod install
Or if you prefer to use directly CocoaPods:
```
$ cd Riot
$ pod install
```
This will load all dependencies for the Element source code, including [MatrixKit](https://github.com/matrix-org/matrix-ios-kit)
and [MatrixSDK](https://github.com/matrix-org/matrix-ios-sdk).
[1]**Note**: you can run the script `createWorkspace.sh`. This script runs `bundler` if it's installed, CocoaPods otherwise:
```
$ cd Riot
$ sh createWorkspace.sh
```
### Open workspace
@@ -134,6 +123,7 @@ You may need to change the bundle identifier and app group identifier to be uniq
Each target has its own YAML file in the folder Targets folder.
## Generate IPA
To build the IPA we are currently using [fastlane](https://fastlane.tools/).
@@ -171,4 +161,3 @@ Or you can use the wrapper script located at `/Tools/Release/buildRelease.sh`. F
And then indicate a branch or a tag like this:
`$ ./buildRelease.sh <tag or branch>`