README.md
author Dirk Zimmermann <dirk@pep-project.org>
Wed, 23 May 2018 12:24:35 +0200
changeset 4747 01ad9bbf04d3
parent 4172 18d7a16e25b6
child 5157 d1ecbc98dc86
child 5639 d8027123cd2a
permissions -rw-r--r--
IOS-145 how to create secret.xcconfig
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
dirk@211
    12
### Dependencies of prerequisites
dirk@211
    13
dirk@1148
    14
For building the engine, you need a working python2 environment
dirk@1148
    15
and all dependencies:
dirk@1148
    16
dirk@1148
    17
```
dirk@1225
    18
sudo port install python27
dirk@1148
    19
sudo port install asn1c
dirk@1148
    20
sudo port install py27-lxml
dirk@1148
    21
dirk@1148
    22
sudo port install python_select
dirk@1224
    23
sudo port select python python27
dirk@3524
    24
dirk@3524
    25
sudo port install autoconf
dirk@3524
    26
sudo port install libtool
dirk@3524
    27
sudo port install automake
dirk@1148
    28
```
dirk@211
    29
dirk@609
    30
### Other dependecies
dirk@609
    31
dirk@609
    32
#### pEpEngine: [yml2](https://fdik.org/yml/toolchain)
dirk@609
    33
dirk@609
    34
Clone into your home directory:
dirk@609
    35
dirk@609
    36
```
dirk@609
    37
pushd ~
dirk@3786
    38
hg clone https://pep.foundation/dev/repos/yml2/
dirk@609
    39
popd
dirk@609
    40
```
dirk@609
    41
ana@683
    42
## Setup instructions
dirk@113
    43
dirk@59
    44
```
dirk@59
    45
mkdir ~/src
dirk@59
    46
cd ~/src
dirk@59
    47
dirk@3786
    48
git clone https://pep-security.lu/gitlab/misc/ldns/
dirk@3160
    49
git clone https://github.com/fdik/libetpan.git
dirk@3186
    50
git clone https://github.com/x2on/OpenSSL-for-iPhone.git
xavier@3310
    51
git clone https://github.com/SwipeCellKit/SwipeCellKit.git
dirk@3544
    52
git clone https://github.com/openid/AppAuth-iOS
dirk@59
    53
dirk@3786
    54
hg clone https://pep.foundation/dev/repos/pantomime-iOS/
dirk@3786
    55
hg clone https://pep.foundation/dev/repos/netpgp-et
dirk@3786
    56
hg clone https://pep.foundation/dev/repos/pEpEngine
dirk@3786
    57
hg clone https://pep.foundation/dev/repos/pEpObjCAdapter
dirk@3786
    58
hg clone https://pep.foundation/dev/repos/MessageModel/
dirk@3786
    59
hg clone https://pep.foundation/dev/repos/libAccountSettings/
dirk@59
    60
dirk@3786
    61
hg clone https://pep-security.ch/dev/repos/pEp_for_iOS/
dirk@59
    62
```
dirk@83
    63
andreas@1802
    64
### Build Project
andreas@1802
    65
andreas@1802
    66
Open pEpForiOS.xcworkspace and build schema "pEp".
dirk@1148
    67
dirk@949
    68
### Unit Tests
dirk@113
    69
dirk@4172
    70
The non-existing file referenced in the unit test project, ./pEpForiOSTests/TestUtil/SecretTestData.swift, must be
dirk@4172
    71
created, with a class named SecretTestData, derived from TestDataBase. Override populateAccounts().
dirk@986
    72
dirk@4172
    73
The tests will not compile without a syntactically correct SecretTestData.swift that inherits from TestDataBase.
dirk@3786
    74
dirk@3707
    75
### UI Tests
dirk@3707
    76
dirk@3708
    77
There is a file referenced in the UI test project, UITestData. You need to create it
dirk@4172
    78
(./pEpForiOSUITests/SecretUITestData.swift), and implement it according to the protocol UITestDataProtocol.
dirk@3709
    79
dirk@3709
    80
The UI tests will not compile without it.
dirk@3713
    81
andreas@3864
    82
### secret.xcconfig (needed for OAuth2 config secrects and others)
dirk@3713
    83
andreas@3864
    84
Create secret.xcconfig @ pEpForiOS/secret.xcconfig, with those contents:
dirk@3713
    85
dirk@3713
    86
```
dirk@4747
    87
OAUTH2_GMAIL_CLIENT_ID = some_content
dirk@4747
    88
OAUTH2_GMAIL_REDIRECT_URL_SCHEME = some_content
dirk@4747
    89
dirk@4747
    90
OAUTH2_YAHOO_CLIENT_ID = some_content
dirk@4747
    91
OAUTH2_YAHOO_CLIENT_SECRET = some_content
dirk@4747
    92
dirk@3713
    93
```