pEp macOS Desktop adapter
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.
David Alarcon f080af1c50 Merge branch 'MOS-13' 1 week ago
Submodules/pEpNotifications Merge branch 'MOS-13' 1 week ago
pEpMacOSAdapter APPLEMAIL-31 Delete Makefile. 1 month ago
pEpMacOSAdapter.xcodeproj MOS-8 Change pEpMacOSAdapterProtocol to PEPMacOSAdapterProtocol. 1 month ago
pEpMacOSAdapter.xcworkspace uses download client repo again. Donwloadclient will be used by other products too (future linux & Windows updater) 2 months ago
pEpNotifications/pEpNotifications Translated using Weblate (Ukrainian) 1 month ago
.gitignore connect 7 months ago
LICENSE Initial commit 9 months ago
README.md MOS-8 Change pEpMacOSAdapterProtocol to PEPMacOSAdapterProtocol. 1 month ago

README.md

p≡p macOS Desktop adapter

This adapter will sport three main features:

  • p≡p API via Apple XPC (not yet implemented)
  • p≡p API via p≡p JSON adapter (still provided by miniadapter)
  • p≡p Update Client

Deployment

PER_MACHINE_DIRECTORY="/Library/Application Support/pEp"
PER_USER_DIRECTORY=$HOME/.pEp

This software is supporting macOS 10.10 and later.

Required Tools

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

sudo port install git
sudo port install mercurial
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 ~
hg clone https://pep.foundation/dev/repos/yml2/
popd
curl https://sh.rustup.rs -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_pEpMacOSAdapter
cd src_pEpMacOSAdapter
mkdir local

export MACOSX_DEPLOYMENT_TARGET=10.10

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

git clone -b boost-1.73.0 --recursive https://github.com/boostorg/boost.git
pushd "boost"
./bootstrap.sh --prefix=$(pwd)/../local/
./b2 --with-system --with-filesystem --with-program_options --with-thread
./b2 install
popd

git clone -b CRYPTOPP_8_2_0 https://github.com/weidai11/cryptopp
pushd cryptopp
export PREFIX=$(pwd)/../local/
make
make install
unset PREFIX
popd

hg clone https://pep.foundation/dev/repos/downloadclient/

git clone https://gitea.pep.foundation/fdik/pEpMacOSAdapter.git

Build

Using Xcode UI

open pEpMacOSAdapter/pEpMacOSAdapter.xcworkspace/

Build scheme “All” of pEpMacOSAdapter.xcworkspace

Using terminal

xcodebuild -workspace "pEpMacOSAdapter.xcworkspace" -scheme "All" -configuration RELEASE

(or DEBUG)

Build Dir & Build Artefacts

You can find the build artefacts in the build folder odf the project or the used submodules:

src_pEpMacOSAdapter/pEpMacOSAdapter/build/foundation.pEp.adapter.macOS.xpc src_pEpMacOSAdapter/pEpMacOSAdapter/Submodules/pEpNotifications/build/p≡p updates.app

Implementation

The implementation is split in to parts:

  1. the working code is in pEpMacOSAdapter; the implementation is in Objective C
  2. the User Interface is in pEpNotifications; the implementation is in Swift

PEPMacOSAdapterProtocol, implemented with XPC

see PEPMacOSAdapterProtocol.h

This protocol is provided to the User Interface to get informed when a download was happening. When a subscription is active updateNow() can be used to search for immediate updates.