This service acts as an intermediary between Bisq clients and Apple Push Notification service (APNs) or Firebase Cloud Messaging (FCM) in order to send push notifications to the mobile app. More documentation can be found here.
This repository has a dependency on git submodules bisq
and bisq-gradle.
There are two ways to clone it before it can be built:
- Use the --recursive option in the clone command:
$ git clone --recursive https://github.com/bisq-network/bisq-relay.git
- Do a normal clone, and pull down the bisq repo dependency with two git submodule commands:
$ git clone https://github.com/bisq-network/bisq-relay.git
$ cd bisq-relay
$ git submodule init
$ git submodule update
$ ./gradlew clean build
Prior to running the service, several files need to be obtained in order to be able to send push notifications to APNs and FCM, and ultimately to the corresponding mobile app.
An appropriate fcmServiceAccountKey.json
file needs to be copied to the root folder.
Download it from the Firebase console
under project settings
> service accounts
.
Note, the Android app needs to be built with a corresponding
google-services.json
file for the same Firebase project.
An appropriate apnsCertificate.production.p12
file needs to be copied to the root folder, along with the
corresponding password stored within a apnsCertificatePassword.txt
file.
Note, the APNs certificate needs to be manually renewed every year.
In order to obtain the APNs certificate, the following will need to be done on macOS:
- Create and download a cer file from https://developer.apple.com/account/ios/certificate/?teamId=XXXXXX
- Add the *.cer file to your keychain.
- In keychain, go to "My certificates". Expand the Apple Push Service certificate and select both lines. Then export the certificate as a *.p12 file.
After building the project, a bisq-relay
script will be generated at the root of the project.
Run the script. If the necessary files as described above are located in the root folder, the service should start running.
$ ./bisq-relay
If you need to specify a custom location/name of the files, you can provide arguments as follows:
$ export BISQ_RELAY_OPTS="-Dfcm.firebaseConfigurationFile=serviceAccountKey.json -Dapns.certificateFile=apnsCert.production.p12 -Dapns.certificatePasswordFile=apnsCertPassword.txt"; ./bisq-relay