Feedback

public struct Feedback : Codable

Provides an encapsulation for feedback data gathered from end users. For example, a survey form containing questions about a specific feature (context), a rating (e.g., 1-5 stars, or thumbs up/down) given by the end user (score), and optional comments (comment). The score property must be within the bounds of minimumScore and maximumScore; if it exceeds either bound, the property will be set to the minimum or maximum score, respectively.

  • The minimum allowed score for feedback.

    Declaration

    Swift

    public static let minimumScore: Int
  • The maximum allowed score for feedback.

    Declaration

    Swift

    public static let maximumScore: Int
  • Context (e.g., feature) to which the feedback pertains.

    Declaration

    Swift

    public var context: String { get set }
  • Rating given by the user; on a scale of -99 to 99.

    Declaration

    Swift

    public var score: Int { get set }
  • Comments provided by the user. Comments uploaded to the Mobile Services cockpit will be truncated after 255 characters, and the truncated characters will be replaced with an ellipsis.

    Declaration

    Swift

    public var comment: String { get set }
  • Initializer for Feedback.

    Declaration

    Swift

    public init(context: String = "", score: Int, comment: String = "")

    Parameters

    context

    Feature to which the feedback pertains.

    score

    Rating given by the user; on a scale of -99 to 99.

    comment

    Comments provided by the user. Comments uploaded to the Mobile Services cockpit will be truncated after 255 characters, and the truncated characters will be replaced with an ellipsis.