LocationConsentUIProtocol

public protocol LocationConsentUIProtocol

Location Consent UI Protocol.

  • Returns an instance of the class conforming to LocationConsentUIProtocol protocol

    Declaration

    Swift

    static func instance() -> LocationConsentUIProtocol?
  • Prompts the user to grand authorization for location access and calls the completion block with the response.

    Declaration

    Swift

    func promptForLocationAuthorizationConsent(for badge: Badge, completion: @escaping (_ consent: Bool) -> Void)
    Parameters
    badge

    the badge requires access to the device’s location

    completion

    Completion block for passing user’s response back to the UsherSDK

  • Inform user that location access is not authorized and that the user needs to enable it from settings to use the badge.

    Declaration

    Swift

    func informUserOfLocationAuthorizationError(for badge: Badge, completion: @escaping () -> Void)
    Parameters
    badge

    the badge requires access to the device’s location

    completion

    Completion block for notifying the SDK user confirms the error message.

  • Dismiss all UIs presented.

    Declaration

    Swift

    func dismiss()