README.md
author Dirk Zimmermann <dirk@pep-project.org>
Wed, 17 May 2017 05:52:07 +0200
changeset 2171 24d39b6449b6
parent 2075 db75662777ac
child 2655 7ae47a0db044
permissions -rw-r--r--
IOS-509 update refs to MessageModel, pEpObjCAdapter
dirk@59
     1
# How to build
dirk@59
     2
dirk@59
     3
## Prerequisites
dirk@59
     4
dirk@813
     5
### Package managers
dirk@813
     6
dirk@1148
     7
MacPorts for installing all dependencies:
dirk@813
     8
dirk@813
     9
Install [MacPorts](https://www.macports.org/) for your
dirk@813
    10
[version of OS X/macOS](https://www.macports.org/install.php).
dirk@813
    11
hernani@156
    12
### Install CAcert root certificates
hernani@156
    13
hernani@156
    14
Import the root certificates of the community-driven CAcert project
hernani@157
    15
in order to deal with the Mercurial repositories via https; for Mac
hernani@158
    16
OS X follow (the GUI or commandline) instructions provided:
hernani@156
    17
hernani@156
    18
http://wiki.cacert.org/FAQ/ImportRootCert#Mac_OS_X
hernani@156
    19
hernani@158
    20
Before using, please check the authenticity of the certificate(s)
hernani@159
    21
downloaded.
hernani@158
    22
hernani@158
    23
The fingerprints should be:
hernani@158
    24
hernani@158
    25
* Class 1 PKI Key (SHA1): 13:5C:EC:36:F4:9C:B8:E9:3B:1A:B2:70:CD:80:88:46:76:CE:8F:33 
hernani@158
    26
* Class 3 PKI Key (SHA1): AD:7C:3F:64:FC:44:39:FE:F4:E9:0B:E8:F4:7C:6C:FA:8A:AD:FD:CE
hernani@158
    27
hernani@158
    28
(Cf. http://www.cacert.org/index.php?id=3)
hernani@158
    29
dirk@211
    30
### Dependencies of prerequisites
dirk@211
    31
dirk@1148
    32
For building the engine, you need a working python2 environment
dirk@1148
    33
and all dependencies:
dirk@1148
    34
dirk@1148
    35
```
dirk@1225
    36
sudo port install python27
dirk@1148
    37
sudo port install asn1c
dirk@1148
    38
sudo port install py27-lxml
dirk@1148
    39
dirk@1148
    40
sudo port install python_select
dirk@1224
    41
sudo port select python python27
dirk@1148
    42
```
dirk@211
    43
dirk@609
    44
### Other dependecies
dirk@609
    45
dirk@2074
    46
#### Note
dirk@2074
    47
dirk@2074
    48
If you have not installed the CA Cert certificates, replace `cacert` in hostnames
dirk@2074
    49
with `letsencrypt`.
dirk@2074
    50
dirk@609
    51
#### pEpEngine: [yml2](https://fdik.org/yml/toolchain)
dirk@609
    52
dirk@609
    53
Clone into your home directory:
dirk@609
    54
dirk@609
    55
```
dirk@609
    56
pushd ~
dirk@609
    57
hg clone https://cacert.pep.foundation/dev/repos/yml2/
dirk@609
    58
popd
dirk@609
    59
```
dirk@609
    60
ana@683
    61
## Setup instructions
dirk@113
    62
dirk@59
    63
```
dirk@59
    64
mkdir ~/src
dirk@59
    65
cd ~/src
dirk@59
    66
dirk@59
    67
git clone https://github.com/fdik/libetpan
dirk@2075
    68
git clone https://cacert.pep-security.lu/gitlab/ios/OpenSSL-for-iPhone.git
dirk@59
    69
dirk@62
    70
hg clone https://cacert.pep.foundation/dev/repos/pantomime-iOS/
dirk@59
    71
hg clone https://cacert.pep.foundation/dev/repos/netpgp-et
dirk@59
    72
hg clone https://cacert.pep.foundation/dev/repos/pEpEngine
dirk@2171
    73
hg clone https://cacert.pep.foundation/dev/repos/pEpObjCAdapter
dirk@2171
    74
hg clone https://cacert.pep.foundation/dev/repos/MessageModel/
dirk@1787
    75
hg clone https://cacert.pep.foundation/dev/repos/libAccountSettings/
dirk@59
    76
dirk@62
    77
hg clone https://cacert.pep-security.ch/dev/repos/pEp_for_iOS/
dirk@59
    78
```
dirk@83
    79
dirk@2074
    80
Note that pEpEngine includes a static libcurl. For
dirk@83
    81
rebuilding see the respective scripts. But you should not have to do that for iOS.
dirk@113
    82
dirk@1148
    83
### UI Tests
dirk@1148
    84
dirk@1148
    85
Set up working account for UI tests. After copying, fill in working account:
dirk@1148
    86
dirk@1148
    87
```
dirk@1148
    88
cp ./pEpForiOSUITests/UITestData.swift.sample ./pEpForiOSUITests/UITestData.swift
dirk@1148
    89
```
andreas@1802
    90
### Build Project
andreas@1802
    91
andreas@1802
    92
Open pEpForiOS.xcworkspace and build schema "pEp".
dirk@1148
    93
dirk@949
    94
### Unit Tests
dirk@113
    95
dirk@1777
    96
You need to create a copy of TestDataImpl/sample.swift as TestDataImpl.swift
dirk@1777
    97
and populate it with corresponding (valid) settings to run the tests successfully.
dirk@986
    98
dirk@986
    99
The tests will not compile without a syntactically correct TestData.swift.
dirk@211
   100
dirk@113
   101
```
dirk@1777
   102
cp pEpForiOSTests/Util/TestData_sample.swift pEpForiOSTests/Util/TestData.swift
dirk@113
   103
```