How to build


Package managers

MacPorts for installing all dependencies:

Install MacPorts for your version of OS X/macOS.

Dependencies of prerequisites

For building the engine, you need a working python2 environment and all dependencies:

sudo port install python27
sudo port install asn1c
sudo port install py27-lxml

sudo port install python_select

sudo port install autoconf
sudo port install libtool
sudo port install automake

sudo port install gmake

Other dependecies

pEpEngine: yml2

Clone into your home directory:

pushd ~
hg clone

Setup instructions

mkdir ~/src
cd ~/src

git clone
git clone
git clone
git clone
git clone

hg clone
hg clone
hg clone
hg clone
hg clone
hg clone

hg clone

Build Project

Open pEpForiOS.xcworkspace and build schema "pEp".

Unit Tests

Out of the box, most tests expect a local test server:

cd ~/Downloads
shasum -a 256 greenmail-standalone-1.5.9.jar
8301b89007e986e8d5e93e2504aad866a58b07b53ac06abb87e6e43eb7646261  greenmail-standalone-1.5.9.jar
java -Dgreenmail.setup.test.all \
-jar ~/Downloads/greenmail-standalone-1.5.9.jar

The non-existing file referenced in the unit test project, ./pEpForiOSTests/TestUtil/SecretTestData.swift, must be created, with a class named SecretTestData, derived from TestDataBase.

In SecretTestData.swift, you must override populateVerifiableAccounts, adding servers that are either registered in the LAS database or provide DNS SRV for IMAP and SMTP in order to test the "automatic account login".

If you want to run the tests against your own servers, override populateAccounts accordingly.

UI Tests

There is a file referenced in the UI test project, UITestData. You need to create it (./pEpForiOSUITests/SecretUITestData.swift), and implement it according to the protocol UITestDataProtocol.

The UI tests will not compile without it.

secret.xcconfig (needed for OAuth2 config secrects and others)

Create secret.xcconfig @ pEpForiOS/secret.xcconfig, with those contents:

OAUTH2_GMAIL_CLIENT_ID = some_content

OAUTH2_YAHOO_CLIENT_ID = some_content