Class Veery

systemAuthorization(_ authorization : Int)

Requires Veery for iOS version 1.3.0

Allow to you to check :

  • If Location is authorized by the user.
  • If Remote Notifications are authorized by the user.

Authorization are given by the user to the system using the following popup window Veery auth

This popup is triggered by the system when veery.activate is called.

Activate should be called to activate the Veery agent event if systemAuthorization returns true. In that case the popup will not be triggered.

Parameters

Param name Type Usage
authorization int Veery.USER_AUTH_GEOLOC : To check location service status if is authorizedAlways or authorizedWhenInUse
Veery.USER_AUTH_GEOLOC_BACKGROUND : To check location service status if is authorizedAlways
Veery.USER_AUTH_NOTIFICATION : To check notification status

Returns

true if all Parameters sent in this function are authorized by the user

false if one of this Parameters is not authorized by the user

Usage / Example

    veery.systemAuthorization(
        Veery.USER_AUTH_GEOLOC |
        Veery.USER_AUTH_GEOLOC_BACKGROUND |
        Veery.USER_AUTH_NOTIFICATION)

    // Or

    veery.systemAuthorization(
        Veery.USER_AUTH_GEOLOC +
        Veery.USER_AUTH_GEOLOC_BACKGROUND +
        Veery.USER_AUTH_NOTIFICATION)

    //return true if all Parameters are enabled

    //OR you can check only one Parameter

    veery.systemAuthorization(Veery.USER_AUTH_GEOLOC_BACKGROUND)

    //return true if the location service is enabled (authorizedAlways)

User interaction

none

This function will not request for the authorization. If needed, this is done by the veery.activate function