Doing this correctly means going "back" to proto2 for SessionRecords, because we need to distinguish between "0" and "absent" in the serialized protobuf data. (Note that we can do this independently of SignalClient properly making this distinction because the proto3 implementation we're using, prost, will omit scalar proto3 fields whose values match their defaults.) |
||
|---|---|---|
| .. | ||
| DeviceTransfer.proto | ||
| Fingerprint.proto | ||
| Groups.proto | ||
| KeyBackup.proto | ||
| Makefile | ||
| Provisioning.proto | ||
| README.md | ||
| SessionRecord.proto | ||
| SignalIOS.proto | ||
| SignalService.proto | ||
| StorageService.proto | ||
| WebSocketResources.proto | ||
SignalServiceKit Protobufs
These protobuf definitions are copied from Signal-Android, but modified to match some iOS conventions.
Prequisites
Install Apple's swift-protobuf (not the similarly named protobuf-swift)
brew install swift-protobuf
This should install an up to date protobuf package as a dependency. Note that since we use the legacy proto2 format, we need to specify this in our .proto files.
syntax = "proto2";
Building Protobuf
cd ~/src/WhisperSystems/SignalServiceKit/protobuf
make