GithubHelp home page GithubHelp logo

hubert3 / opentrace-ios Goto Github PK

View Code? Open in Web Editor NEW

This project forked from opentrace-community/opentrace-ios

0.0 1.0 0.0 2.85 MB

OpenTrace iOS app. Reference implementation of the BlueTrace protocol.

Home Page: https://bluetrace.io

License: GNU General Public License v3.0

Ruby 3.73% Swift 96.27%

opentrace-ios's Introduction

OpenTrace iOS App

alt text

OpenTrace is the open source reference implementation of BlueTrace.

BlueTrace is a privacy-preserving protocol for community-driven contact tracing across borders. It allows participating devices to log Bluetooth encounters with each other, in order to facilitate epidemiological contact tracing while protecting users’ personal data and privacy. Visit https://bluetrace.io to learn more.

The OpenTrace reference implementation comprises:

Building the code

  1. Install the latest Xcode developer tools from Apple
  2. Install CocoaPods
  3. Clone the repository
  4. Run pod install at root of project

Configuration

Setting up Firebase for Staging and Production

The app relies on Firebase functions to work. More information can be obtained in the OpenTrace cloud functions repository.

  1. After setting up Firebase, place your configuration files in the respective directories.

    |-- /FIREBASE
        |-- /PROD
            |-- GoogleService-Info.plist
        |-- /STG
            |-- GoogleService-Info.plist
    
  2. In Targets > OpenTrace > Build Phases > Setup Firebase Environment GoogleService-Info.plist, you will find the code that is used to copy the Plist files into the Plist destination.

  3. In Targets > OpenTrace > Info > URL Types, insert the GoogleService-Info.plist REVERSED_CLIENT_ID in URL schemes.

    Image of URL Types

Configuring BlueTrace

You can find BlueTrace config variables at BluetraceConfig.swift.

Setting build variables

To configure STG and PROD variables, define them in Targets > OpenTrace > Build Settings > User-Defined and declare them in Info.plist.

These are some of the User-Defined variables.

PRODUCT_BUNDLE_IDENTIFIER
FIREBASE_STORAGE_URL
SERVICE_UUID
V2_CHARACTERISTIC_ID

Screenshot of User-Defined

Image of User-Defined

Screenshot of Info.plist

Image of Info.plist

Adding a privacy statement URL

Find ConsentViewController.swift and replace the placeholder with your privacy statement URL.

@IBAction func privacySafeguardsBtn(_ sender: Any) {
        // check if website exists
        guard let url = URL(string: "<PRIVACY_STATEMENT_URL>") else {
            return
        }
...

Setting Firebase remote config

The "Share" message uses Firebase remote config. The key is "ShareText". If it is unable to be retrieved, the app falls back to defaultShareText.

Debug Screen

There is a debug screen accessible within the staging version of the app. This allows you to view the app's Bluetooth communication log. To access it, you first have to set up the app. Then, tap on the home screen image.

Linting

There's a build script in Targets > OpenTrace > Build Phases > Swiftlint which runs SwiftLint on Build. Run {PODS_ROOT}/SwiftLint/swiftlint autocorrect to auto-fix some linting errors.

Security Enhancements

SSL pinning is not included as part of the repo

Statement from Apple

The following is a statement from Apple: "To ensure the credibility of health and safety information, Apple is only accepting COVID-19 related apps from recognised entities such as government organisations, health-focused NGOs, companies deeply credentialed in health issues, and medical or educational institutions. Only developers from one of these recognized entities should submit an app related to COVID-19 to the App Store.

For more information visit https://developer.apple.com/news/?id=03142020a"

Known issues

iOS has limitations on background Bluetooth activity. Details are documented in the white paper at https://bluetrace.io.

opentrace-ios's People

Contributors

joelkek avatar svanboxel avatar unusep avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.