Skip to content

app maintenance document

Yilin Gao edited this page Dec 11, 2017 · 1 revision

Password

Right now the app is password protected, to avoid access from unauthorized users during the testing period. After opening the app, the first page is for the user to enter the password. The password is set to “123456”.

Install App

Right now the app is a testing version, and is not uploaded to the two major mobile app stores, namely, iOS App Store and Google Play. Only a limited number of users will be invited by the client to download and use the app. For the iOS platform, the app has been hosted on the Duke University App Store (https://appstore.colab.duke.edu/), where developers can publish new versions of the app, and users can download the latest version of the app to their phones. For the Android platform, the app is distributed using the Android .apk installation file.

  • iOS
  1. In the browser of user’s iPhone, go to the website "appstore.colab.duke.edu".
  2. Find the app “CureBPPV”, and click its icon to enter its page. Click the button “install on iPhone”, and there will be a login page for the user to enter his Duke netid and password.
  3. After login, the user is able to download it.
  4. After downloading, click the icon for the app on your iPhone. There will be a prompt saying something like “the developer is not trusted by your iPhone”.
  5. To trust the developer, the user need to go to Settings -> General -> Device Management. There the user could find the app waiting for you to trust it.
  6. After trusting the app, the user can start to use the app.

In this way, users could be invited to install the app on their iPhones, as long as they are within the Duke system (have netid). And when future updates of the app are uploaded to Duke University App Store, users could re-download the app following the same procedure.

The iOS version of the app has been tested on iOS 10 and 11.

  • Android
  1. Developers or maintainers need to generate an .apk file for each version release of the app.
  2. Developers or maintainers need to send the .apk file to all users who have access to the app.
  3. Users can install the app on their Android phones using the received .apk file.

The Android version of the app has been tested on Android 8.

Layout of Project Folder

layout

In the app -> pages, corresponding JavaScript files for each page you could see in the app are listed in order:

  1. password.js
  2. home.js
  3. instructions.js
  4. illustration.js
  5. prepare.js
  6. step1.js
  7. step2.js
  8. step3.js
  9. end.js

Recommended Editor

We developed the app using Visual Studio Code, with its ESLint plugin. There is already workspace setting for Visual Studio Code under the project root folder (in .vscode). So if you use Visual Studio Code, hopefully there will be less problems.

Build the App

You could follow the instructions provided by React Native to run the app for both iOS and Android: https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies. Specifically, you need to have Node.js, npm, and Watchman. The versions of these softwares that we use are:

  • Node.js: v6.11.2
  • npm which comes together with Node.js: v3.10.10
  • Watchman: v4.9.0

You could also use Xcode to build an iOS app, and use Android Studio to build an Android app.

  • Xcode

Open the ios folder in the project root folder with your Xcode. This folder contains everything that Xcode needs to know to build the app. Then you can use Xcode in the usual way.

  • Android

Open the android folder in the project root folder with your Android Studio. This folder contains everything that Android Studio needs to know to build the app. Then you can use Android Studio in the usual way.

Release a New Version of the App

  • iOS

Refer to the note about upload an app build to Duke CoLab App Store.

  • Android

Just use Android Studio to generate an .apk file for the new version.

Update Non-Programming Components

Assume before updating any information you are in the root folder of the project. And after updating any information, you need to rebuild the app for both iOS and Android.

  • Update post-maneuver survey link

Go to file app -> pages -> home.js. Search for a variable named SURVEY_URL, and change its value to the new survey url.

  • Update login password

Go to file app -> pages -> password.js. Search for a variable named PASSWORD, and change its value to the new password.

  • Update introductory video and illustrative images

To change the video on the introduction page to another one, first put the video file (.mp4) into the asset folder assets -> video with a name like new_video.mp4. Then go to file app -> pages -> home.js. Search for a line of code import sampleVideo from '../../assets/video/youtube.mp4'. The relative path in the single quote is the path to the video file. Change it to the new path.

To change an image on a specific page, first locate the .js file for the page according to information in the section “Layout of Project Folder”. Images are all imported at the beginning of files. Look for the import path for the specific image, and update it to the new path.

  • Update texts in the app

Texts occur everywhere in the app. To update certain texts on a specific page, first locate the .js file for the page according to information in the section “Layout of Project Folder”. In the file just search for the current text, and replace them with new texts.