MRLocationManager Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | MRLocationManager.h |
Overview
Estimates a Location using available technology, including CoreLocation and iBeacon hardware. Using this class
will prompt the user for permission to use Location Services. You may want to check [CLLocationManager locationServicesEnabled]
and other related properties to determine if the user has granted permission to use these services.
You MUST provide a message presented to the user when Location Services are requested, by setting one or both of
the “purpose strings” in Info.plist using the keys NSLocationAlwaysAndWhenInUseUsageDescription and NSLocationWhenInUseUsageDescription.
delegate
The delegate object to receive update events.
@property (nullable, nonatomic, weak) id<MRLocationManagerDelegate> delegateDeclared In
MRLocationManager.h
location
The last location received. Will be nil until a location has been received.
@property (nullable, nonatomic, strong, readonly) MRLocation *locationDeclared In
MRLocationManager.h
locationError
Returns the current most relevant error condition that may be preventing location from being determined or updated frequently, or nil.
@property (nullable, nonatomic, readonly) NSError *locationErrorDeclared In
MRLocationManager.h
– initWithApp:
Initialize an MRLocationManager with the given “app” in the Editor. Note that this is different than the concept of a “mobile app”. “App” in this case refers to the location within the Meridian Editor which can contain buildings, maps, and other content.
- (instancetype)initWithApp:(MREditorKey *)appKeyParameters
appKey |
A key that represents a Meridian app. |
|---|
Declared In
MRLocationManager.h
– startUpdatingLocation
Start updating location as determined by ranging for Location Beacons and/or using the system location manager. Calling this method may may trigger a request for “when in use” location authorization, which requires certain entries in your app’s Info.plist.
- (void)startUpdatingLocationDeclared In
MRLocationManager.h
– stopUpdatingLocation
Stop updating location.
- (void)stopUpdatingLocationDeclared In
MRLocationManager.h
+ getCurrentLocationWithApp:timeout:completion:
Attempt to determine the current location given the specified timeout
+ (void)getCurrentLocationWithApp:(MREditorKey *)appKey timeout:(NSTimeInterval)timeout completion:(void ( ^ ) ( MRLocation *_Nullable location , NSError *_Nullable error ))completionParameters
appKey |
A key that represents a Meridian app. |
|---|---|
timeout |
Maximum amount of time allowed to acquire location. |
completion |
Block to be called on completion. May return a non-null MRLocation object or error depending on the outome. |
Declared In
MRLocationManager.h