You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Dirk Zimmermann f5dbb9ff42 IOSAD-206 Update PEPSessionTest 2 years ago
PEPObjCAdapterTypes IOS-2735 rm queryKeySyncEnabled. Is needless now, other adapters do not have it and it even might deliver contradicting results from an app point of view. 2 years ago
PEPObjCAdapterTypesTests_iOS Merge branch '1.1.250' into IOSAD-191 2 years ago
PEPObjCAdapterTypes_iOS IOSAD-186 adds support for Swift clients (module maps) 2 years ago
PEPObjCAdapterTypes_macOS adds macOS lib target 2 years ago
PEPObjCAdapter_iOS cleanup 2 years ago
PEPObjCAdapter_macOS adds ObjCAdapter static lib target 2 years ago
Subprojects/SampleApp fixes: dependencies not explicitly mentioned in scheme 2 years ago
pEpObjCAdapter IOSAD-194 use Logger everywhere 2 years ago
pEpObjCAdapter.xcodeproj IOSAD-206 Add XCTestCase+PEPSession (project) 2 years ago
pEpObjCAdapter.xcworkspace IOSAD-186 renames Sample App 2 years ago
pEpObjCTests IOSAD-206 Update PEPSessionTest 2 years ago
pEpiOSAdapterTests initial commit 8 years ago
yml2 IOSAD-63 trying to use yml2 for PEPMessage 5 years ago
.gitignore adds gitignore 2 years ago IOS-2651 No need for mercurial anymore 2 years ago


HowToBuild static lib for macOS


PER_MACHINE_DIRECTORY="/Library/Application Support/pEp"

Required Tools

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

sudo port install git
sudo port install gmake
sudo port install autoconf
sudo port install libtool
sudo port install automake
sudo port install wget
sudo port install capnproto

pushd ~
git clone

curl -sSf | sh

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

Install Xcode (if not installed already)

Apple IDs & Certificates

Apple ID

You need to have an Apple ID (connected to pEp team account) configured in Xcode . Ask #service, if you want to be added to the team account.

Build Dependencies

mkdir src_pEpObjCAdapter_macOS
cd src_pEpObjCAdapter_macOS
mkdir local


git clone -b OpenSSL_1_1_1g
pushd "openssl"
./Configure --prefix=$(pwd)/../local/ --openssldir=$(pwd)/../local/ssl darwin64-x86_64-cc
make install

wget -nc"${TARBALL}"
tar xvf "${TARBALL}"
pushd ${GMP_DIR}
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=$(pwd)/../local/lib/pkgconfig ./configure --host=${HOST} --prefix=$(pwd)/../local/
make -j4
make install
rm -rf "${TARBALL}"


wget -nc${NETTLE_VERSION}.tar.gz
tar xvf "${TARBALL}"
pushd ${NETTLE_DIR}
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=$(pwd)/../local/lib/pkgconfig ./configure --host=${HOST} --prefix=$(pwd)/../local/ --with-lib-path=$(pwd)/../local/lib --with-include-path=$(pwd)/../local/include
make -j4
make install
rm -rf "${TARBALL}"

git clone -b "pep-engine" --depth 1
pushd sequoia
make build-release PYTHON=disable
make install PYTHON=disable PREFIX=$(pwd)/../local/

git clone git://
pushd asn1c
git checkout tags/v0.9.28 -b pep-engine
autoreconf -iv
./configure --prefix=$(pwd)/../local/
make install

wget -nc${TARBALL}
tar xvf "${TARBALL}"
pushd ${ICONV_DIR}
./configure --prefix=$(pwd)/../local/ --enable-static
make -j 4
make install

#TODO: weget and build libz too and link it to libetpan. Rm linking dynamic lib in client afterwards.

git clone
pushd libetpan
#ToDo: This is not working (afaics). libetpan is still using the systems dynamic iconv lib. I was unable yet to force libetpan to use libiconv.a
unset CFLAGS
export LDFLAGS="-Wl/Users/buff/workspace/pEp/src_pEpObjCAdapter_macOS/local/libiconv.a" 
./ --prefix=$(pwd)/../local/ --enable-shared=no
make install
#BAD, required due to ios libetpan sub project. RM after moving out of project or even better being able to build macOS libetpan with the Xcode project
rm -rf libetpan
git clone

git clone
git clone
git clone


iOS Only: Copy System DB

The system.db from the pEpEngine repository must be copied in the bundle that uses the pEpObjCAdapter.a static lib. The ObjCAdapter copies it at runtime in the desired directory.

Backround: Has been introduces to use Apple Shared App Directory of the client App.

Using Xcode UI

open pEpMacOSAdapter/pEpObjCAdapter.xcworkspace/

Build scheme "All" of pEpObjCAdapter.xcworkspace

Using terminal

xcodebuild -workspace "pEpObjCAdapter.xcworkspace" -scheme "PEPObjCAdapter_macOS" -configuration RELEASE

(or DEBUG)

Build Dir & Build Artefacts

You can find the build artefacts in the pEpMacOSAdapter/build folder