Background Tracking

To achieve background tracking you will need to follow a few steps

  1. First call requestWhenInUseAuthorization() from the NaurtLocationManager class. Even if your already have this permission, call it from NaurtLocationManager, so that Naurt can manage permissions effectively.
  2. Later in the app lifecycle, call requestAlwaysAuthorization() of the NaurtLocationManager. It's important to call this after requestWhenInUseAuthorization(), since Apple does not allow requesting all background permissions at once.

Once more, if you only want to track when the app is active then you only need to do step 1 and call requestWhenInUseAuthorization().

If the user denies location permissions to the app or parental controls have denied location permissions to the app, then Naurt will enter the blocked state. In the blocked state, all of Naurt's features will be disabled. You can check if this is the case with the getIsBlocked() method.

If the user does deny permissions, you are allowed to inform them that there are additional features availabloe and direct them to the settings where they can give more permissions.