Skip to content

Latest commit

 

History

History
 
 

iOS

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Build iOS SwiftLint

Overview

This directory contains all the code necessary to build the FDA MyStudies iOS application for study participants. Customization of the Default.xcconfig and Branding.plist files will enable your iOS application to interact with the other components of your FDA MyStudies deployment. Further customization of app branding can be accomplished by replacing the default application images with your own. All configuration related to the creation and operation of studies is done using the Study builder without need for code changes or redeployment of the mobile application.

Example screens

Requirements

The FDA MyStudies iOS application requires Xcode 11 or newer, and can be run on iOS versions 11 and above.

Platform integration

The FDA MyStudies mobile application fetches all study, schedule, activity, eligibility, consent and notification information from the Study datastore and posts pseudonymized participant response data to the Response datastore. Consent forms and any other identifiable data is posted to the Participant datastore. Email and password authentication is handled by the MyStudies Auth server using OAuth 2.0.

Configuration instructions

  1. Open the iOS/MyStudies/MyStudies.xcworkspace in Xcode
  2. Map your project’s build configuration to iOS/MyStudies/MyStudies/Default.xcconfig (instructions)
  3. Update the following in the Default.xcconfig file:
    • Update STUDY_DATASTORE_URL with your Study datastore URL
    • Update RESPONSE_DATASTORE_URL with your Response datastore URL
    • Update USER_DATASTORE_URL with your User datastore URL
    • Update ENROLLMENT_DATASTORE_URL with your Enrollment datastore URL
    • Update CONSENT_DATASTORE_URL with your Consent datastore URL
    • Update AUTH_URL with your Auth server URL
    • Update HYDRA_BASE_URL with your Hydra server URL
    • Update HYDRA_CLIENT_ID with the client_id you configured during Hydra deployment (the mobile applications share a client_id with each other, the Auth server and the Participant manager)
    • Update API_KEY with the bundle_id and app_token that you configured study-datastore/src/main/resources/authorizationResource.properties during Study datastore deployment with format <value of ios.bundleid>:<value of ios.apptoken>
    • Update APP_ID variable with the AppId that will be configured by the study administrator in the Study builder user interface
    • Set APP_TYPE to either “gateway” or “standalone”
    • Update STUDY_ID key with the StudyId configured by the study administrator in the Study builder user interface (not required for Gateway applications)
  4. Enable push notifications by creating push notification certificates in encrypted .p12 format (for more information, visit Establishing a Certificate-Based Connection to APNs)
  5. Configure your Participant datastore instance to interface with your mobile application (skip this step if following the semi-automated deployment guide - you will complete an automated version of this task when you return to that guide)
  6. Optional. Customize images and text

Building and deploying

Instructions for building and deploying iOS applications can be found here.


Copyright 2020 Google LLC