LiUserLocation Reference


Inherits From: NSObject
Declared In: LiUserLocation.h

Overview


The LiUserLocation is a helper class for LiCore.framework, serving as the bridge class through which location-handling actions may be performed. By default, the Applicasa-supplied User class utilizes LiUserLocation methods. Developers may include these methods in their own code to allow Applicasa to handle Location needs if they wish.


Tasks


Location Handling

- getCurrentLocationWithBlock:
- updateLocationWithAccuracy:distanceFilter:andBlock:
- updateLocationAutomaticallyWithAccuracy:distanceFilter:andBlock:
- stopAutoUpdate


Properties


locationAction

The block to run on completion of getting or updating a user's location.

@property (nonatomic, assign) LiBlockLocationAction locationAction;

Discussion:

Allows additional processing or action after location is found. The locationAction block must match the signature (NSError *error, CLLocation *location, Actions action).

Declared In: LiUserLocation.h


Instance Methods


getCurrentLocationWithBlock:

Instance method to get a user's current location.

- (void) getCurrentLocationWithBlock:(LiBlockLocationAction)block;

Parameters:

block
A block for taking action after a user's location is found. Must match the signature (NSError *error, CLLocation *location, Actions action).

Discussion:

Gets a current user's location, requiring a block parameter for additional processing or action after location is found. The block must match the signature (NSError *error, CLLocation *location, Actions action).

Declared In: LiUserLocation.h

updateLocationWithAccuracy:distanceFilter:andBlock:

Instance method to update a user's current location with specific accuracy and distance expectations.

- (void) updateLocationWithAccuracy:(CLLocationAccuracy)accuracy distanceFilter:(CLLocationDistance)distanceFilter andBlock:(LiBlockLocationAction)block;

Parameters:

accuracy
A CLLocationAccuracy argument indicating the accuracy desired.

distance
A CLLocationDistance argument indicating the distance desired.

block
A block for taking action after a user's location is found. Must match the signature (NSError *error, CLLocation *location, Actions action).

Discussion:

Updates a user's current location with specific accuracy and distance expectations. This method is to be used whenever you want Applicasa to update a user's location, but do not want Applicasa to continue automatically updating a user's location in the background. An example of this type of usage could be a simple location-based check-in type of action. Also requires a block parameter for additional processing or action after location update is complete. The block must match the signature (NSError *error, CLLocation *location, Actions action).

Declared In: LiUserLocation.h

updateLocationAutomaticallyWithAccuracy:distanceFilter:andBlock:

Instance method to update a user's current location with specific accuracy and distance expectations, and instructions for continuing to update automatically as user location changes over time.

- (void) updateCurrentLocationAutomaticallyWithAccuracy:(CLLocationAccuracy)accuracy distanceFilter:(CLLocationDistance)distance andBlock:(LiBlockLocationAction)block;

Parameters:

accuracy
A CLLocationAccuracy argument indicating the accuracy desired.

distance
A CLLocationDistance argument indicating the distance desired.

block
A block for taking action after a user's location is found. Must match the signature (NSError *error, CLLocation *location, Actions action).

Discussion:

Updates a user's current location with specific accuracy and distance expectations, and instructions for continuing to update automatically as user location changes over time. Also requires a block parameter for additional processing or action after location update is complete. The block must match the signature (NSError *error, CLLocation *location, Actions action).

Declared In: LiUserLocation.h

stopAutoUpdate

Instructs Applicasa to stop updating a user's location.

- (void) stopAutoUpdate;

Discussion:

Instructs Applicasa to stop updating a user's location. This method is only required when you've instructed Applicasa to update user location automatically via updateLocationAutomaticallyWithAccuracy:distanceFilter:andBlock:.

Declared In: LiUserLocation.h


  « Back to SDK Class List