WOVEmergencyManager

@objc public final class WOVEmergencyManager: NSObject, WOVEmergencyReporting

Provides WOVER’s functionality related to user’s emergency and safety management

  • A boolean indicating that a local notification should be shown at lock screen. - note: Application should request user’s permission for notification alert option prior showing emergency local notification.

    Declaration

    Swift

    public var showLocalNotification: Bool
  • Emergency local notification key

    Declaration

    Swift

    public let EmergencyNotificationKey: String = "EmergencyNotificationKey"
  • A boolean indicating if user marked him/her self being in emergency or not.

    Declaration

    Swift

    public internal(set) var userInEmergency: Bool
  • Emergency local notification alert title

    Note

    Default value In case of emergency slide me

    Declaration

    Swift

    public var localNotifTitle: String = NSLocalizedString("In case of emergency slide me",
  • Emergency local notification alert body

    Note

    Default value I will notify your personal safety network about your emergency along with important information.

    Declaration

    Swift

    public var localNotifBody: String = NSLocalizedString("I will notify your personal safety network about your emergency along with important information.",
  • Notifies if user is in emergency or not. Also this method updates the value of userInEmergency.

    Declaration

    Swift

    public final func reportEmergency(inEmergency: Bool, type: VerificationType, text: String?, completion: @escaping (_ success: Bool, _ error: Error?) -> ())

    Parameters

    inEmergency

    True if user is in emergency or false when user is back in safety.

    type

    A type user used to verify emergency or safety.

    text

    An optional text send along with emergency or safety event.

    completion

    A block that is called when request is finished. This block is passed the following parameters:

    success

    A Boolean value that indicates whether the request was processed successfully. This parameter is false if an error occurred while processing the request; otherwise, it is true.

    error

    An error object. If an error occurred, this object contains information about the error; otherwise, it is set to nil.