Git Product home page Git Product logo

lirisoft-llc / covid-alert-app Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 16.55 MB

COVID Tracing Mobile app forked from the Canada COVID Alert app to interact with the APHL exposure server

License: Apache License 2.0

Shell 0.34% JavaScript 27.11% Ruby 2.06% TypeScript 54.47% Starlark 0.08% Java 5.66% Kotlin 5.97% Objective-C 2.66% C 0.01% Swift 1.63%
covid-alert exposure-notification android coivdapp canadaapp covidtracing covidshield cds-snc canada-covid covidapp

covid-alert-app's Introduction

La version française suit.

COVID Alert Mobile App

This repository modifes the Canada COVID app to work with the APHL (give full form) server that is being rolled out in the US. It implements a React Native client application for Apple/Google's Exposure Notification framework.

Lint + Typscript

Available for iOS and Android:

Download on the App Store Get it on Google Play

Pour iOS et Android:

Télécharger dans l'App Store Disponible sur Google Play

Overview

This app is built using React Native and designed to work well with patterns on both Android and iOS devices.

Customization

This app is modified to connect to the google Exposure Notifications API. The primitive changes are done to connect to the exposure notification server, still exception, edges cases are yet to be done. It is compatible to work with APHL Key server. APHL will be granted only to public health authorities.

Local development

Prerequisites

Follow the steps outlined in React Native Development Environment Setup to make sure you have the proper tools installed.

Node

iOS

Android

  • Android device with the ability to run the latest version of Google Play Services or Google Play Services Beta. Sign up for beta program here https://developers.google.com/android/guides/beta-program.
  • You also need a safelisted APPLICATION_ID that will be used to publish to Google Play. You could use APPLICATION_ID from Google Sample App for testing purposes "com.google.android.apps.exposurenotification". Go to Environment config to see how to change APPLICATION_ID.

1. Check out the repository

git clone [email protected]:cds-snc/covid-shield-mobile.git

2. Install dependencies

yarn install
2.1 Additional step for iOS
2.1.1 Install Cocoapods
sudo gem install cocoapods
2.1.2 Install pods
bundle install && yarn pod-install

3. Environment config

Check .env and adjust configuration if necessary. See react-native-config for more information.

Ex:

ENVFILE=.env.production yarn run-ios
ENVFILE=.env.production yarn run-android

4. Start app in development mode

You can now launch the app using the following commands for both iOS and Android.

yarn run-ios
yarn run-android

You can also build the app with native development tool:

  • For iOS, using Xcode by opening the CovidShield.xcworkspace file in the ios folder.
  • For Android, using Android Studio by opening android folder.

Development mode

When the app is running in development mode, you can tap on the COVID Alert logo at the top of the app to open the Test menu. This menu enables you to:

  • Put the app into test mode to bypass the Exposure Notification API check
  • Change the system status
  • Change the exposure status
  • Send a sample notification
  • Reset the app to onboarding state

Note that: Test menu is enabled if the environment config file (.env*) has TEST_MODE=true. To disable test mode UI on production build, simply set it to false in the environment config file TEST_MODE=false.

iOS Local Development

Please add the following keys to the info.plist file. These keys should not be commited to the repo, and used only for local development.

	<key>NSAppTransportSecurity</key>
	<dict>
		<key>NSAllowsLocalNetworking</key>
		<true/>
		<key>NSAllowsArbitraryLoads</key>
		<false/>
	</dict>

Customization

You can customize the look and feel of the app largely by editing values found in the Theme File.

Localization

The COVID Alert app is available in French and English. Fully localized content can be modified by editing translations files found in the translations directory. More translations can be added by using the same mechanism as French and English.

After modifying the content you must run the generate-translations command in order for the app to reflect your changes.

yarn generate-translations

Add new translation

  1. Create a new i18n file in src/locale/translations/.
  2. Add the new option pt in translations.js.
  3. Regenerate the translations yarn generate-translations.
  4. Add the new option in src/components/LanguageToggle.tsx.
  5. Add the new option in src/screens/language/Language.tsx.
  6. Add the new option in Xcode Localizations settings (Project -> CovidShield -> Info tab -> Localizations) and make sure Launch Screen.storyboard is checked.

Testing

Who built COVID Alert?

COVID Alert was originally developed by volunteers at Shopify. It was released free of charge under a flexible open-source license.

This repository is being developed by the Canadian Digital Service. We can be reached at [email protected].

Troubleshooting

[Android] Problem with debug.keystore during run Android version

Logs

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "/Users/YOUR_USER/.android/debug.keystore": keystore password was incorrect

Generate a new debug.keystore:

cd android/app
keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

Copy your debug.keystore to ~/.android/debug.keystore:

cd android/app
cp debug.keystore ~/.android/debug.keystore

Now you can run yarn run-android in your root folder.

[MacOS] Problem installing Cocoapods

When following step 2.1.1 Install Cocoapods if you receive an error that looks like the following (Please Note: Error message will not be identical but simliar):

ERROR:  Loading command: install (LoadError)
  dlopen(/Users/$home/ruby/2.6.5/x86_64-darwin18/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/$home/ruby/2.6.5/x86_64-darwin18/openssl.bundle
ERROR:  While executing gem ... (NoMethodError)

This is because the version of Ruby you have installed does not have OpenSSL included.

You can fix this error by installing Ruby Version Manager (if you do not already have it), and reinstalling the version of Ruby required with OpenSSL using the following steps:

  1. Install RVM following the instructions here: https://rvm.io/
  2. Run the following command to install the version of Ruby needed with OpenSSL included, this will take a few minutes so be patient.
rvm reinstall 2.6.5 --with-openssl-dir=/usr/local/opt/openssl

You should now be able to install cocoapods and gem commands should now work.


covid-alert-app's People

Contributors

abhiin1947 avatar amazingphilippe avatar ankitsingh1492 avatar candidosales avatar dsamojlenko avatar eliseka avatar emilybulger avatar gavrix avatar henrytao-me avatar honkfestival avatar its-anirudh avatar janicduplessis avatar jeberhardt avatar jeffmaher avatar jelen-hc avatar jordanatshopify avatar jsoref avatar katewilhelm avatar kpeatt avatar lchski avatar maxneuvians avatar mtropper avatar nagaliri avatar nickmalloryods avatar nickmly avatar pisajew avatar raminderchopra avatar sboots avatar smcmurtry avatar timarney avatar

Stargazers

 avatar

Watchers

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