This repository contains the iOS release of the Dutch COVID-19 CoronaCheck project.
- The iOS app is located in the repository you are currently viewing.
- The Android app can also be found on GitHub.
See minvws/nl-covid19-coronacheck-app-coordination for further technical documentation.
The codebase was building two different app products:
CoronaCheck (referred to internally as the Holder app) was the official app of the Netherlands for showing coronavirus entry passes. With this digital tool, you could a certificate with QR code of your negative test, vaccination, or recovery. This allowed access to certain venues and activities abroad. Or at the border.
CoronaCheck Scanner (referred to internally as the Verifier app) was the official scanner app of the Netherlands for coronavirus entry passes. With this digital tool, you could verify if visitors have a valid certificate of their negative test, vaccination, or recovery. You did this by scanning their QR code. This way, you could safely give access to your venue or activity.
The apps can run on devices that meet the following requirements.
- Operating System: iOS 11.0+
- Internet connection (either Wifi or Mobile Data)
The latest accessibility audit can be found at [2023-05-27 Toegankelijkheidsonderzoek CoronaCheck 4.13 (iOS) versie 3.0.pdf](/Accessibility/2023-05-27 Toegankelijkheidsonderzoek CoronaCheck 4.13 (iOS) versie 3.0.pdf)
The app does not work anymore, it just opens informing the user about the current deactivated status, with a link to a website offering the last available information for the corona passes. To check previous features of the app, check out one of the previous releases/tags.
There are a number of Swift Packages in Packages/
, which the app target depends on. Here is the dependency graph:
The majority of our third-party dependencies are included as Swift Packages. Here is an overview of what dependencies are used and why.
-
RSwiftLibrary: for strongly-typed, autocompleted resources like images, fonts, colours.
-
SwiftSoup: for parsing and sanatizing HTML
- XcodeGen: Command Line tool to generate an Xcode projectfile based on a project.yml description file. The .xcodeproj file that is generated by this tool is not checked into the git repository but has to be created when checking out the code by running
make generate_project
.
- Nimble: for succinct unit test expressions.
- SnapshotTesting: for recording the expected state of UI components.
- Fastlane: for automating the build and distribution pipeline.
To build and develop the app you need:
The Xcode project file (CTR.xcodeproj) is not checked-in to git. Instead, we generate it dynamically using XcodeGen based on project.yml.
There is a Makefile which makes it easy to get started (if you encounter any issues running this, please do open an issue):
Simply run make dev
from the command line.
It will use Homebrew to install these tools, and will install githooks for:
- GitLFS (which will download the snapshot PNGs used in our unit tests)
- XcodeGen (which will update the Xcode project each time you change branches)
It will run bundle install
to setup your Ruby dependencies such as fastlane.
Lastly, it will generate and open the Xcode Project for you. You should run the Holder Dev
scheme targetting a simulator to get started..
In order to facilitate CI and reproducible builds, this codebase can be built using Github Actions.
The app uses a few mainstream iOS architectural concepts throughout:
- App Coordinator https://khanlou.com/2015/10/coordinators-redux/
- Environment https://www.pointfree.co/episodes/ep16-dependency-injection-made-easy
- ViewModels https://www.swiftbysundell.com/articles/different-flavors-of-view-models-in-swift/
AppCoordinator
is the main starting point of the app.
Localization was managed in a lokalise project.
Localisation assets could be downloaded from lokalise using the command make download_translations
.
The Lokalise CLI (which this triggers) downloads separate .strings
and .stringsdict
files for the Holder and Verifier projects.
We pipe these assets through R.swift as a build phase to create a static list of translated strings, and for convenience (keys shared between both projects are created in the Holder project) we first merge the Holder and Verifier assets together, before the R.swift step runs. This is done by the merge_localizations.sh script. This script also issues a warning if any duplicate keys are detected after this merge (i.e. if a key appeared in both Holder and Verifier, indicating a clash).
Many strings contain HTML tags for basic markup (<b>
, <i>
, <ul>
etc). It was found that it was easy for a copy-writer to make a mistake inputting these HTML tags in their CMS web interface, and if these mistakes were undetected then it could make labels render strangely in the app at runtime.
To combat that, a very basic HTML syntax validator was written which outputs at build time warnings about the common mistakes that it checks for, for example:
Closing a tag
<a>
which doesn’t match the last opened tag<b>
R.swift collates the colors and images from bundled asset catalogs, generating a Swift file with an accessor for each asset.
Fonts are accessible via Fonts.swift
The development team used to work on the repository in a private fork (for reasons of compliance with existing processes) and was sharing its work as often as possible.
If you plan to make non-trivial changes, we recommend to open an issue beforehand where we can discuss your planned changes. This increases the chance that we might be able to use your contribution (or it avoids doing work if there are reasons why we wouldn't be able to use it).
Note that all commits were signed using a gpg key.