A Swift Package containing the Swift Thrift models required for Ophan tracking
🕓 2 weeks ago
.package(url: "https://github.com/guardian/ophan-thrift-swift.git", from: "0.26.0")
This repository contains:
- A Swift Package containing the Thrift definitions used for Ophan tracking.
- A custom GitHub Action, which is used for auto-generating the aforementioned Swift Package in response to changes to Ophan's Thrift definitions.
This package contains the Swift Thrift models required for sending tracking events to Ophan. It can be imported (as a dependency) by a Swift project (e.g. the iOS Live App).
This is comprised of three main parts:
- A Dockerfile, which describes the environment (e.g. an appropriate version of Thrift) needed to auto-generate the Swift Package.
- A bash script, which updates the Swift Thrift models stored in this repository and creates a release. The script is invoked as part of the Dockerfile.
- A custom GitHub Action, which allows a workflow defined in another repository to run our script (inside the relevant Docker container). Although the Action is defined in this repository, it is invoked inside the Ophan repository, since it needs to be triggered in response to changes to the Thrift definitions.