Classes
The following classes are available globally.
-
See moreLocalizationBundle
is a wrapper for returning a bundle along with a table name and target suffixes. This is used by theLocalization
class to return localized strings that are defined in a strings file embedded in the given bundle.Declaration
Swift
open class LocalizationBundle : NSObject
-
See moreLocalization
is a wrapper class for getting a localized string that allows overriding the bundles to search for a given string. To use this class, call one of the localization methods. To override the value returned by one of the bundles, add the string to a bundle higher up in the list order of theallBundles
property.Declaration
Swift
open class Localization : NSObject
-
See moreRSDActiveUIStepObject
extends theRSDUIStepObject
to include a duration and commands. This is used for the case where anRSDUIStep
has an action such asstart walking
orstop walking
; the step may also implement theRSDActiveUIStep
protocol to allow for spoken instruction.Declaration
Swift
open class RSDActiveUIStepObject : RSDUIStepObject, RSDActiveUIStep
-
See moreRSDChoiceInputFieldObject
is a concrete implementation ofRSDChoiceInputField
that subclassesRSDInputFieldObject
to include a list of choices for a multiple choice or single choice input field. It is intended to be instantiated with a list of choices but can be subclassed to decode the choices using a custom decoder.Declaration
Swift
open class RSDChoiceInputFieldObject : RSDInputFieldObject, RSDChoiceOptionsWithDefault
-
See moreRSDCodableChoiceInputFieldObject
is a concrete implementation ofRSDChoiceInputField
that subclassesRSDInputFieldObject
to include a list of choices for a multiple choice or single choice input field. It is designed to be used byRSDFactory
or a subclass to encode and decode the choices as a typed array ofRSDChoiceObject
objects.Declaration
Swift
public final class RSDCodableChoiceInputFieldObject<T> : RSDInputFieldObject, RSDChoiceOptions where T : Decodable, T : Encodable
-
See moreRSDChoicePickerTableItemGroup
subclassesRSDInputFieldTableItemGroup
to implement a single or multiple choice question where the choices are presented as a list.Declaration
Swift
open class RSDChoicePickerTableItemGroup : RSDInputFieldTableItemGroup
-
An item group for entering a boolean data type.
See moreDeclaration
Swift
public final class RSDBooleanTableItemGroup : RSDChoicePickerTableItemGroup
-
See moreRSDChoiceTableItem
is used to represent a single row in a table where the user picks from a list of choices.Declaration
Swift
open class RSDChoiceTableItem : RSDInputFieldTableItem
-
The purpose of this struct is to allow using a normalized
See moreuptime
for processes that may need to track the time while the device is asleep. This clockstopwatch
will keep running even when the device has gone to sleep.Declaration
Swift
public class RSDClock
-
A cohort rule can be used to mutate a list of cohorts of which the participant is a member. A cohort is a data group that participants are added to based on the results of survey questions.
See moreDeclaration
Swift
open class RSDCohortTrackingRule : RSDTrackingRule, Codable
-
The color matrix is a shared singleton that allows for accessing the color palettes using registered libraries that are included within the Research framework.
See moreDeclaration
Swift
public final class RSDColorMatrix
-
The color rules object is a concrete implementation of the design rules used for a given version of the SageResearch frameworks. A module can use this class as-is or override the class to enforce a set of rules pinned to the tasks included within a module. This is important to allow a module to be validated against a given UI/UX. The frameworks can later change to reflect new devices, OS changes, and design system updates to incorporate the results of more design studies.
See moreDeclaration
Swift
open class RSDColorRules
-
Color rules for defining a scale for a series of colors.
See moreDeclaration
Swift
open class RSDSeverityColorScale
-
See moreRSDCountdownUIStepObject
extends theRSDActiveUIStepObject
to include default values for a countdown step that is intended to preceed an active step.Declaration
Swift
open class RSDCountdownUIStepObject : RSDActiveUIStepObject
-
RSDDataLogger
is used to write data samples using a custom encoding to a logging file.Note
This class does not use a serial queue to process the samples. It is assumed that the recorder that is using this file will handle that implementation.Declaration
Swift
open class RSDDataLogger
-
The design rules are intended as a way of consolidating UI/UX design system rules in a logical grouping. A task module can define a design system that should be used for the tasks defined within that module.
See moreDeclaration
Swift
open class RSDDesignSystem
-
See moreRSDFactory
handles customization of decoding the elements of a task. Applications should override this factory to add custom elements required to run their task modules.Declaration
Swift
open class RSDFactory
-
RSDCodingInfo
is used as a pointer to a mutable class that can be used to assign any info that must be mutated during the Decoding of an object.Declaration
Swift
public class RSDCodingInfo
-
See moreRSDFileResultUtility
is a utility for naming temporary files used to save task results.Declaration
Swift
public class RSDFileResultUtility
-
The font rules object is a concrete implementation of the design rules used for a given version of the SageResearch frameworks. A module can use this class as-is or override the class to enforce a set of rules pinned to the tasks included within a module. This is important to allow a module to be validated against a given UI/UX. The frameworks can later change to reflect new devices, OS changes, and design system updates to incorporate the results of more design studies.
See moreDeclaration
Swift
open class RSDFontRules
-
See moreRSDFormStepDataSourceObject
is a concrete implementation of theRSDTableDataSource
protocol that is designed to be used to supply the data source for a form step. This class inherits fromRSDStepViewModel
to allow the table view controller to use this class as itsstepViewModel
.Declaration
Swift
open class RSDFormStepDataSourceObject : RSDStepViewModel, RSDTableDataSource
-
See moreRSDFormUIStepObject
is a concrete implementation of theRSDFormUIStep
andRSDSurveyNavigationStep
protocols. It is a subclass ofRSDUIStepObject
and can be used to display a navigable survey.Declaration
Swift
open class RSDFormUIStepObject : RSDUIStepObject, RSDFormUIStep, RSDSurveyNavigationStep, RSDCohortAssignmentStep
-
An item group for entering data that is a human-measurement in localized units appropriate to the size-range of a human (adult, child, infant).
See moreDeclaration
Swift
open class RSDHumanMeasurementTableItemGroup : RSDInputFieldTableItemGroup
-
See moreRSDInputFieldObject
is aDecodable
implementation of theRSDSurveyInputField
protocol. This is implemented as an open class so that the decoding strategy can be used to support subclasses.Declaration
Swift
open class RSDInputFieldObject : RSDSurveyInputField, RSDMutableInputField, RSDCopyInputField, Codable
-
See moreRSDInputFieldTableItemGroup
is used to represent a single input field.Declaration
Swift
open class RSDInputFieldTableItemGroup : RSDTableItemGroup
-
An item group for entering text.
See moreDeclaration
Swift
public final class RSDTextFieldTableItemGroup : RSDInputFieldTableItemGroup
-
An item group for entering a date.
See moreDeclaration
Swift
public final class RSDDateTableItemGroup : RSDInputFieldTableItemGroup
-
An item group for entering a number value.
See moreDeclaration
Swift
public final class RSDNumberTableItemGroup : RSDInputFieldTableItemGroup
-
An item group for entering data requiring a multiple component format.
See moreDeclaration
Swift
public final class RSDMultipleComponentTableItemGroup : RSDInputFieldTableItemGroup
-
A custom implementation for inputing a person’s height that can set up a picker for setting the height of an adult. Typically, US participants will report an adult height using ft and in, whereas a child or infant will be reported in inches. The placeholder text for child or infant measurement range will be either
See moreinches
orcentimeters
, depending upon the participant’s locale.Declaration
Swift
public final class RSDHeightInputTableItem : RSDTextInputTableItem
-
A custom implementation for inputing a person’s mass (weight) that can set up a picker for setting the weight of an infant. Typically, US participants know what their newborn baby’s weight is in lb and oz. Additionally, the placeholder text for an adult or child measurement range will be either
See morepounds
orkilograms
, depending upon the participant’s locale.Declaration
Swift
public final class RSDMassInputTableItem : RSDTextInputTableItem
-
See moreRSDModalStepTableItem
is used to represent a item row that, when selected, should display a step view controller.Declaration
Swift
open class RSDModalStepTableItem : RSDTableItem
-
See moreRSDMultipleComponentInputFieldObject
extends the properties ofRSDInputFieldObject
with information required to create a multiple component input field.Declaration
Swift
open class RSDMultipleComponentInputFieldObject : RSDInputFieldObject, RSDMultipleComponentOptions
-
An table item for entering a number value.
See moreDeclaration
Swift
public final class RSDNumberInputTableItem : RSDTextInputTableItem
-
See moreRSDOverviewStepObject
extends theRSDUIStepObject
to include information about an activity including what permissions are required by this task. Without these preconditions, the task cannot measure or collect the data needed for this task.Declaration
Swift
open class RSDOverviewStepObject : RSDUIStepObject, RSDOverviewStep
-
See moreRSDPopoverInputFieldObject
is a wrapper for a form step that allows it to conform to the input field protocol. This is intended to allow a model that shows summary information about the input field in a main view controller and using a modal presentation style to actually input the fields.Declaration
Swift
@available(*, deprecated) open class RSDPopoverInputFieldObject : RSDFormUIStepObject, RSDPopoverInputField, RSDCopyInputField
-
See moreRSDResourceConfig
is designed as an overridable resource configuration manager. The functions and properties are intended to be overridable in the app by implementing a custom extension of the function with the same name. This is designed to use app-wins namespace conflict resolution that is typical of obj-c architecture.Declaration
Swift
open class RSDResourceConfig : NSObject
-
See moreRSDResourceTransformerObject
is a concrete implementation of a codable resource transformer. The transformer can be used to create an object decoded from an embedded resource.Declaration
Swift
public final class RSDResourceTransformerObject : Codable
-
A result summary step is used to display a result that is calculated or measured earlier in the task.
See moreDeclaration
Swift
open class RSDResultSummaryStepObject : RSDActiveUIStepObject, RSDResultSummaryStep, RSDNavigationSkipRule
-
RSDSampleRecorder
is a base-class implementation of a controller that is used to record samples.While it isn’t prohibited to instantiate this class directly, this is intended as an abstract implementation for recording sample data from GPS location, accelerometers, etc.
Using this base implementation allows for a consistent logging of shared sample data key words for the step path and the uptime. It implements the logic for writing to a file, tracking the uptime and start date, and provides a consistent implementation for error handling.
See moreDeclaration
Swift
open class RSDSampleRecorder : NSObject, RSDAsyncAction
-
See moreRSDRecordSampleLogger
is used to write samples encoded as json dictionary objects to a logging file.Declaration
Swift
public class RSDRecordSampleLogger : RSDDataLogger
-
A Codable struct that can be used to store messaging information specific to the use-case specific to the associated activity, task, or step.
See moreDeclaration
Swift
public final class RSDStandardPermission : NSObject, RSDPermission, Codable
-
Declaration
Swift
open class RSDStepViewModel : NSObject, RSDStepViewPathComponent
-
The study configuration is intended as a shared singleton that contains any information that should be applied to the entire study that may effect the presentation of a given module.
See moreDeclaration
Swift
open class RSDStudyConfiguration
-
See moreRSDTableItem
can be used to represent the type of the row to display.Declaration
Swift
open class RSDTableItem
-
See moreRSDTextTableItem
is used to represent a item row that has static text.Declaration
Swift
public final class RSDTextTableItem : RSDTableItem
-
See moreRSDImageTableItem
is used to represent a item row that has a static image.Declaration
Swift
public final class RSDImageTableItem : RSDTableItem
-
See moreRSDInputFieldTableItem
is an abstract base class implementation for representing an answer, or part of an answer for a givenRSDInputField
.Declaration
Swift
open class RSDInputFieldTableItem : RSDTableItem
-
See moreRSDTableItemGroup
is a generic table item group object that can be used to display information in a tableview that does not have an associated input field.Declaration
Swift
open class RSDTableItemGroup
-
Defines a section in a table. A table is made up of sections, groups, and items.
For most group types, there is one cell per group and there can be one or more groups per section. However, there are exceptions such as multiple-choice lists where each value is displayed in a selectable table item.
See moreDeclaration
Swift
open class RSDTableSection
-
See moreRSDTaskObject
is the interface for running a task. It includes information about how to calculate progress, validation, and the order of display for the steps.Declaration
Swift
open class RSDTaskObject : RSDUIActionHandlerObject, RSDCopyTask, RSDTrackingTask, Decodable
-
The task repository is used by an app to configure fetching tasks.
See moreDeclaration
Swift
open class RSDTaskRepository : NSObject
-
The task state object is a base class implementation that can upload and archive results, return the encoded result, and manage file cleanup.
See moreDeclaration
Swift
open class RSDTaskState : NSObject
-
See moreRSDTaskStepNode
is a subclass ofRSDTaskViewModel
that implements theRSDNodePathComponent
protocol and holds a pointer to an associatedhidden
step. It is hidden in the sense that the base class navigation doesn’t show this with a step view controller.Declaration
Swift
open class RSDTaskStepNode : RSDTaskViewModel, RSDNodePathComponent
-
The TaskViewModel is a base class implementation of the presentation layer for managing a task. It uses the Model–view–viewmodel (MVVM) design pattern to separate out the UX functionality of running a task for a given device category from the UI and from the domain layer.
This class is used to keep track of the current state of a running task. Conceptually, it is a similar pattern to using a separate device-agnostic
DataSource
class to handle UX that is independent of the operating system and which can be used by either aUIViewController
on iOS and tvOS or aWKInterface
on watchOS.The naming convention used is intended to ease cross-platform development with an Android app since on that platform, there are significant advantages to using a Fragment-ViewModel architecture where the base class is a
ViewModel
rather than anNSObject
. The implementation details of this class and the method names will differ from the Android architecture to fit the design patterns which are more common to Swift and Obj-c development.Seealso
RSDTaskController
Declaration
Swift
open class RSDTaskViewModel : RSDTaskState, RSDTaskPathComponent
-
See moreRSDTextInputTableItem
is used to represent a single row in a table that holds a text entry input field. Typically, this would be used to represent a singleRSDInputField
value, but it can also be used to represent a single component in a multiple-component field.Declaration
Swift
open class RSDTextInputTableItem : RSDInputFieldTableItem
-
See moreRSDUIActionHandlerObject
is intended as an abstract implementation of the action handler that implements theCodable
protocol.Declaration
Swift
open class RSDUIActionHandlerObject : RSDUIActionHandler
-
See moreRSDUIStepObject
is the base class implementation for all UI display steps defined in this framework. Depending upon the available real-estate, more than one ui step may be displayed at a time. For example, on an iPad, you may choose to group a set of questions using aRSDSectionStep
.Declaration
Swift
open class RSDUIStepObject : RSDUIActionHandlerObject, RSDDesignableUIStep, RSDTableStep, RSDNavigationRule, RSDCohortNavigationStep, Decodable, RSDCopyStep, RSDDecodableReplacement, RSDStandardPermissionsStep, RSDInstructionStep
-
See moreRSDWeeklyScheduleFormatter
can be used to display formatted text for a weekly schedule item.Declaration
Swift
public class RSDWeeklyScheduleFormatter : Formatter