Skip to content

minvws/nl-covid19-coronacheck-app-ios

COVID-19 CoronaCheck - iOS

Introduction

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.


About the Apps

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.

App Requirements

The apps can run on devices that meet the following requirements.

  • Operating System: iOS 11.0+
  • Internet connection (either Wifi or Mobile Data)

Accessibility

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)

Feature Overview

CoronaCheck

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.

Dependencies

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

Development only

  • 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.

Testing only

  • Nimble: for succinct unit test expressions.
  • SnapshotTesting: for recording the expected state of UI components.

Continuous Integration only

  • Fastlane: for automating the build and distribution pipeline.

Development

Build Requirements

To build and develop the app you need:

  • Xcode 14
  • Xcode Command Line tools (Specifically "Make").
  • Homebrew
  • Git

Getting started

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..

Continuous Integration & reproducible builds

In order to facilitate CI and reproducible builds, this codebase can be built using Github Actions.

Where to begin development

The app uses a few mainstream iOS architectural concepts throughout:

Key classes:

AppCoordinator is the main starting point of the app.

Localized Strings

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>

Colors, Images

R.swift collates the colors and images from bundled asset catalogs, generating a Swift file with an accessor for each asset.

Fonts

Fonts are accessible via Fonts.swift

Contribution process

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.

About

No description, website, or topics provided.

Resources

License

EUPL-1.2, Unknown licenses found

Licenses found

EUPL-1.2
LICENSE.txt
Unknown
LICENSE.pdf

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages