FeedbackEvent

public class FeedbackEvent

User Feedback event build based on SearchSuggestion or SearchResult. Does a result or suggestion have any problem with naming, location or something else? Please send feedback describing the issue! Can be sent by calling sendFeedback(event:) method of any SearchEngine instance.

  • Built-in set of reasons for feedback

    See more

    Declaration

    Swift

    public enum Reason : String, CaseIterable
  • Feedback Reason e.g. incorrect name, translation, position…

    Declaration

    Swift

    public var reason: String?
  • Issue description.

    Declaration

    Swift

    public var text: String?
  • User keyboard locale.

    Declaration

    Swift

    public var keyboardLocale: String?
  • User device orientation.

    Declaration

    Swift

    public var deviceOrientation: String?
  • Screenshot attachment data.

    Declaration

    Swift

    public var screenshotData: Data?
  • Identifier for combining related Mapbox events.

    Declaration

    Swift

    public var sessionId: String? { get set }
  • Build feedback event based on IndexableRecord. Such feedback provides minimum useful information and not so valuable. Consider using init(record: SearchResult, reason: String?, text: String?) for submitting feedbacks please.

    Declaration

    Swift

    public convenience init(userRecord: IndexableRecord, reason: String?, text: String?)

    Parameters

    userRecord

    userRecord to send feedback about

    reason

    feedback reason string, FeedbackEvent.Reason enum has few default values( e.g. incorrect name, position, address …)

    text

    an issue description

  • Build feedback event based on SearchResult.

    Declaration

    Swift

    public convenience init(record: SearchResult, reason: String?, text: String?)

    Parameters

    result

    SearchResult to send feedback about.

    reason

    feedback reason string, FeedbackEvent.Reason enum has few default values( e.g. incorrect name, position, address …)

    text

    an issue description

  • Build feedback event based on SearchResult.

    Declaration

    Swift

    public convenience init(record: SearchResult, reason: Reason, text: String?)

    Parameters

    result

    SearchResult to send feedback about.

    reason

    feedback reason as FeedbackEvent.Reason

    text

    an issue description

  • Build feedback event based on SearchSuggestion.

    Declaration

    Swift

    public convenience init(suggestion: SearchSuggestion, reason: String?, text: String?)

    Parameters

    suggestion

    SearchSuggestion to send feedback about.

    reason

    Feedback Reason - e.g. incorrect name, translation, position…

    text

    Issue additional description

  • Build feedback event of Missing Search Result type. This kind of event is used for reporting search issues where a user can’t find what he’s looking for.

    Declaration

    Swift

    public convenience init(response: SearchResponseInfo, text: String?)

    Parameters

    response

    SearchResponseInfo can be found in SearchEngine.responseInfo. Response info related to last search response.

    text

    Issue additional description