2017-03-16 00:11:24 +01:00
|
|
|
# Building
|
2015-01-04 00:09:56 +01:00
|
|
|
|
2018-07-25 01:50:12 +02:00
|
|
|
We typically develop against the latest stable version of Xcode.
|
2018-07-20 15:48:22 +02:00
|
|
|
|
2020-04-07 05:40:33 +02:00
|
|
|
As of this writing, that's Xcode 11.4
|
2018-11-19 18:36:28 +01:00
|
|
|
|
|
|
|
## Prerequistes
|
|
|
|
|
|
|
|
Install [Carthage](https://github.com/Carthage/Carthage#installing-carthage)
|
2018-07-20 15:48:22 +02:00
|
|
|
|
2017-03-16 00:11:24 +01:00
|
|
|
## 1. Clone
|
2015-01-04 00:09:56 +01:00
|
|
|
|
2018-07-25 01:50:12 +02:00
|
|
|
Clone the repo to a working directory:
|
2017-03-16 00:11:24 +01:00
|
|
|
|
2018-07-20 15:48:22 +02:00
|
|
|
```
|
2020-02-05 04:05:41 +01:00
|
|
|
git clone --recurse-submodules https://github.com/loki-project/session-ios
|
2018-07-20 15:48:22 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Since we make use of submodules, you must use `git clone`, rather than
|
|
|
|
downloading a prepared zip file from Github.
|
|
|
|
|
2018-07-25 01:50:12 +02:00
|
|
|
We recommend you fork the repo on GitHub, then clone your fork:
|
|
|
|
|
|
|
|
```
|
2020-02-05 04:05:41 +01:00
|
|
|
git clone --recurse-submodules https://github.com/<USERNAME>/session-ios.git
|
2018-07-25 01:50:12 +02:00
|
|
|
```
|
|
|
|
|
2020-02-05 04:05:41 +01:00
|
|
|
You can then add the Session repo to sync with upstream changes:
|
2018-07-25 01:50:12 +02:00
|
|
|
|
|
|
|
```
|
2020-02-05 04:05:41 +01:00
|
|
|
git remote add upstream https://github.com/loki-project/session-ios
|
2018-07-25 01:50:12 +02:00
|
|
|
```
|
|
|
|
|
2017-07-21 21:36:19 +02:00
|
|
|
## 2. Dependencies
|
2017-03-16 00:11:24 +01:00
|
|
|
|
2020-02-05 04:05:41 +01:00
|
|
|
To build and configure the libraries Session uses, just run:
|
2017-03-16 00:11:24 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
make dependencies
|
|
|
|
```
|
|
|
|
|
2018-07-25 01:50:12 +02:00
|
|
|
## 3. Xcode
|
2016-11-05 09:59:25 +01:00
|
|
|
|
2017-03-16 00:11:24 +01:00
|
|
|
Open the `Signal.xcworkspace` in Xcode.
|
2016-03-11 19:34:39 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
open Signal.xcworkspace
|
|
|
|
```
|
|
|
|
|
2020-04-07 05:40:33 +02:00
|
|
|
In the TARGETS area of the General tab, change the Team dropdown to
|
|
|
|
your own. You will need to do that for all the listed targets, for ex.
|
2018-01-05 23:34:02 +01:00
|
|
|
Signal, SignalShareExtension, and SignalMessaging. You will need an Apple
|
2020-04-07 05:40:33 +02:00
|
|
|
Developer account for this.
|
2018-01-08 21:10:38 +01:00
|
|
|
|
|
|
|
On the Capabilities tab, turn off Push Notifications and Data Protection,
|
|
|
|
while keeping Background Modes on. The App Groups capability will need to
|
|
|
|
remain on in order to access the shared data storage. The App ID needs to
|
2020-04-07 05:40:33 +02:00
|
|
|
match the SignalApplicationGroup string set in TSConstants.h.
|
2018-01-08 21:10:38 +01:00
|
|
|
|
|
|
|
If you wish to test the Documents API, the iCloud capability will need to
|
|
|
|
be on with the iCloud Documents option selected.
|
2016-03-11 19:34:39 +01:00
|
|
|
|
2017-03-16 00:11:24 +01:00
|
|
|
Build and Run and you are ready to go!
|
2015-01-04 00:09:56 +01:00
|
|
|
|
|
|
|
## Known issues
|
|
|
|
|
2017-07-21 21:36:19 +02:00
|
|
|
Features related to push notifications are known to be not working for
|
|
|
|
third-party contributors since Apple's Push Notification service pushes
|
|
|
|
will only work with Open Whisper Systems production code signing
|
|
|
|
certificate.
|