Classes

The following classes are available globally.

  • LocalizationBundle is a wrapper for returning a bundle along with a table name and target suffixes. This is used by the Localization class to return localized strings that are defined in a strings file embedded in the given bundle.

    See more

    Declaration

    Swift

    open class LocalizationBundle : NSObject
  • Localization 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 the allBundles property.

    See more

    Declaration

    Swift

    open class Localization : NSObject
  • 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 more

    Declaration

    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 more

    Declaration

    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 more

    Declaration

    Swift

    open class RSDColorRules
  • Color rules for defining a scale for a series of colors.

    See more

    Declaration

    Swift

    open class RSDSeverityColorScale
  • 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.
    See more

    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 more

    Declaration

    Swift

    open class RSDDesignSystem
  • RSDFactory handles customization of decoding the elements of a task. Applications should override this factory to add custom elements required to run their task modules.

    See more

    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
  • RSDFileResultUtility is a utility for naming temporary files used to save task results.

    See more

    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 more

    Declaration

    Swift

    open class RSDFontRules
  • 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 inches or centimeters, depending upon the participant’s locale.

    See more

    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 pounds or kilograms, depending upon the participant’s locale.

    See more

    Declaration

    Swift

    public final class RSDMassInputTableItem : RSDTextInputTableItem
  • RSDModalStepTableItem is used to represent a item row that, when selected, should display a step view controller.

    See more

    Declaration

    Swift

    open class RSDModalStepTableItem : RSDTableItem
  • RSDPopoverInputFieldObject 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.

    See more

    Declaration

    Swift

    @available(*, deprecated)
    open class RSDPopoverInputFieldObject : RSDFormUIStepObject, RSDPopoverInputField, RSDCopyInputField
  • RSDResourceConfig 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.

    See more

    Declaration

    Swift

    open class RSDResourceConfig : NSObject
  • RSDResourceTransformerObject is a concrete implementation of a codable resource transformer. The transformer can be used to create an object decoded from an embedded resource.

    See more

    Declaration

    Swift

    public final class RSDResourceTransformerObject : Codable
  • 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 more

    Declaration

    Swift

    open class RSDSampleRecorder : NSObject, RSDAsyncAction
  • RSDRecordSampleLogger is used to write samples encoded as json dictionary objects to a logging file.

    See more

    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 more

    Declaration

    Swift

    public final class RSDStandardPermission : NSObject, RSDPermission, Codable
  • 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 more

    Declaration

    Swift

    open class RSDStudyConfiguration
  • RSDTableItemGroup 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.

    See more

    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 more

    Declaration

    Swift

    open class RSDTableSection
  • The task repository is used by an app to configure fetching tasks.

    See more

    Declaration

    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 more

    Declaration

    Swift

    open class RSDTaskState : NSObject
  • 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 a UIViewController on iOS and tvOS or a WKInterface 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 an NSObject. 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.

    See more

    Declaration

    Swift

    open class RSDTaskViewModel : RSDTaskState, RSDTaskPathComponent
  • RSDTextInputTableItem 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 single RSDInputField value, but it can also be used to represent a single component in a multiple-component field.

    See more

    Declaration

    Swift

    open class RSDTextInputTableItem : RSDInputFieldTableItem
  • RSDWeeklyScheduleFormatter can be used to display formatted text for a weekly schedule item.

    See more

    Declaration

    Swift

    public class RSDWeeklyScheduleFormatter : Formatter