pEp/pEpForiOS
8
0
Fork
You've already forked pEpForiOS
0
p≡p for iOS
  • Swift 81.6%
  • C 13.2%
  • C++ 4.4%
  • Objective-C 0.4%
  • Python 0.3%
Find a file
2026年03月21日 13:56:01 +01:00
Design
Keys IOS-384 works with encryption too 2017年01月12日 17:30:41 +01:00
mogenerator.templates IOS-174 mogenerator support for optional attributes 2016年10月04日 15:46:55 +02:00
pEp-share download keys from keyserver, first implementation 2026年03月20日 14:21:20 +01:00
pEpForiOS download keys from keyserver, first implementation 2026年03月20日 14:21:20 +01:00
pEpForiOS.xcodeproj Merge branch 'master' into FEATURE-4 2026年03月21日 13:51:14 +01:00
pEpForiOS.xcworkspace Include builtins and the backup adapter with tests 2026年02月26日 12:17:20 +01:00
pEpForiOSTests Make tests compile 2026年02月26日 10:05:24 +01:00
Playgrounds IOS-2579 - address comment from review 2021年02月12日 12:46:21 +01:00
scripts IOS-2868 gen_changeset.sh is now in independent repo (used by other projects) 2021年06月30日 13:44:18 +02:00
SubProjects/MessageModel/MessageModel Revert "How to call vks from swift" 2026年02月10日 14:32:49 +01:00
testProjects
testTools/greenmail
.gitignore
CHANGESETS Update changesets to accompany engine Release_2.1.56 2022年03月30日 12:38:02 +02:00
CREDITS.txt
LICENSE.txt license (gpl 3) 2016年06月30日 17:43:57 +02:00
README.md rm sqlite3 from readme 2022年03月01日 13:35:12 +01:00

How to build

Prerequisites

Package managers

MacPorts for installing dependencies:

Install MacPorts for your version of OS X/macOS.

Dependencies of prerequisites

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

sudo port install git
sudo port install asn1c
sudo port install python38
sudo port install py38-lxml
sudo port select --set python3 python38
sudo port install gmake
sudo port install autoconf
sudo port install libtool
sudo port install automake
sudo port install wget
sudo port install gsed
curl https://sh.rustup.rs -sSf | sh
# To run the `greenmail` mailserver for tests
sudo port install openjdk11

add this to ~/.profile (create if it doesn't exist):

source $HOME/.cargo/env
export PATH="$HOME/.cargo/bin:$PATH"

Restart your Console!

sudo port install pkgconfig
rustup update
rustup target add aarch64-apple-ios x86_64-apple-ios
sudo port pkgconfig

Set up Xcode

You need to have an Apple ID configured in Xcode, for code signing. You can add one in the Accounts tab of the settings (menu Xcode > Preferences...).

For some things, your Apple ID needs to be part of the pEp team account. Ask #service, if you want to be added to the team account. When you are a member of the team, the information on your Apple ID in the Xcode Preferences should have a record Team: pEp Security SA, Role: Member.

Other dependencies

pEpEngine: yml2

Clone into your home directory:

pushd ~
git clone https://gitea.pep.foundation/fdik/yml2
popd

Setup instructions

In a directory of your choice, do:

mkdir src_pEp4iOS
cd src_pEp4iOS
git clone http://pep-security.lu/gitlab/misc/changesets_script.git
git clone https://pep-security.lu/gitlab/iOS/OpenSSL-for-iPhone.git
git clone https://pep-security.lu/gitlab/iOS/SwipeCellKit.git/
git clone https://pep-security.lu/gitlab/iOS/CocoaLumberjack
git clone https://pep-security.lu/gitlab/iOS/AppAuth-iOS.git
git clone https://pep-security.lu/gitlab/misc/ldns.git
git clone https://gitea.pep.foundation/pEp.foundation/libAccountSettings
git clone https://gitea.pep.foundation/buff/common-dependency-build-helpers-4-apple-hardware.git
git clone https://gitea.pep.foundation/pEp.foundation/libetpan.git
git clone https://gitea.pep.foundation/pEp.foundation/pEpEngine
git clone http://pep-security.lu/gitlab/iOS/pep-toolbox.git
git clone https://gitea.pep.foundation/pep.foundation/Pantomime.git
git clone https://gitea.pep.foundation/pep.foundation/pEpObjCAdapter.git
git clone https://pep-security.lu/gitlab/iOS/pep4ios.git

Build Project

Open pEpForiOS.xcworkspace and build schema "pEp".

Unit Tests

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

java -Dgreenmail.setup.test.all -Dgreenmail.users=test001:pwd@localhost,test002:pwd@localhost,test003:pwd@localhost -jar ./testTools/greenmail/greenmail-standalone-1.5.9.jar

Note: The following section concerning test data is solved for pEp-internal dev members by checking out a private repo, please ask your colleagues. If you don't have access to that repo, you have to create the needed files yourself.

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

In SecretTestData.swift, you must at least 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

Note: The following section concerning test data is solved for pEp-internal dev members by checking out a private repo, please ask your colleagues. If you don't have access to that repo, you have to create the needed files yourself.

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/../pEp_for_iOS_intern/secret.xcconfig, with those contents:

OAUTH2_GMAIL_CLIENT_ID = your_secret_content
OAUTH2_GMAIL_REDIRECT_URL_SCHEME = your_secret_content
OAUTH2_YAHOO_CLIENT_ID = your_secret_content
OAUTH2_YAHOO_CLIENT_SECRET = some_content

Notes on debugging build problems

Depending on whether you use a distribution of bash from macports or Apple, and the contents of your PATH variable, the build might fail. Especially the engine makes many assumptions about the environment on the build machine.

If you have any build issues, they may also be fixed by changing some of the variables the engine build system uses in ~/src/pEpEngine/local.conf. This is an example configuration file:

YML2_PROC=/opt/local/bin/python2 $(YML2_PATH)/yml2proc
ASN1C=/opt/local/bin/asn1c
ASN1C_INC=/opt/local/share/asn1c/

Note that some of these variables may be overridden in the build system elsewhere, for example the variable YML2_PATH. Check the build steps in pEpEngine.xcodeproj for details.