PWGPSLocationManager Class Reference
Inherits from | NSObject |
---|---|
Conforms to | PWLocationManager |
Declared in | PWGPSLocationManager.h |
Overview
The PWGPSLocationManager
class defines the interface for configuring the delivery of GPS location-related events to your application. You use an instance of this class to establish the parameters that determine when location events should be delivered and to start and stop the actual delivery of those events. This class conforms to the PWLocationManager
protocol.
You are still responsible for requesting permission to use location services. In addition the CLLocationManager
associated with this class is exposed so that it can be configured as desired.
Determining Availability of Services
internalLocationManager
The CLLocationManager
used to deliver indoor GPS location updates.
@property (nonatomic, readonly) CLLocationManager *internalLocationManager
Discussion
You are still responsible for requesting permission to use location services. The CLLocationManagerDelegate
of this instance is owned by the PWGPSLocationManager
instance.
Declared In
PWGPSLocationManager.h
__deprecated
The floor ID mapping dictionary used to define the mapping between the location provider floor ID and the Phunware floor ID. The dictionary format must adhere to the following format: @{CUSTOMER_FLOORID : PHUNWARE_FLOOR_ID}
. (Deprecated: Use defaultFloorId
instead.)
@property (nonatomic, strong) NSDictionary *__deprecated
Declared In
PWGPSLocationManager.h
defaultFloorId
The Maas floor identifier that the GPS locations will map to.
@property (nonatomic, strong) NSNumber *defaultFloorId
Declared In
PWGPSLocationManager.h
location
The latest indoor location received from the Phunware location service.
@property (nonatomic, readonly) PWIndoorLocation *location
Declared In
PWGPSLocationManager.h
– initWithCLLocationManager:
Initializes the location manager with the specified CLLocationManager
instance.
- (instancetype)initWithCLLocationManager:(CLLocationManager *)locationManager
Parameters
locationManager |
The location manager to use for GPS positioning. There parameter cannot be |
---|
Return Value
A PWGPSLocationManager
instance.
Declared In
PWGPSLocationManager.h
– locationServicesAvailable
Returns a Boolean value indicating whether location services are enabled on the device.
- (BOOL)locationServicesAvailable
Discussion
In order to fetch the user’s location, the manager must be within proximity of the venue and have retrieved specific device information from Phunware’s servers.
Declared In
PWLocationManager.h
– startUpdatingLocation
Starts the generation of updates that report the user’s current location.
- (void)startUpdatingLocation
Discussion
This method returns immediately. Calling this method causes the location manager to obtain an initial location fix (which may take several seconds) and notify your delegate by calling its locationManager:didUpdateToLocation:
method.
Declared In
PWLocationManager.h
– stopUpdatingLocation
Stops the generation of location updates.
- (void)stopUpdatingLocation
Discussion
Call this method whenever your code no longer needs to receive location-related events. Disabling event delivery gives the receiver the option of disabling the appropriate hardware (and thereby saving power) when no clients need location data. You can always restart the generation of location updates by calling the startUpdatingLocation
method again.
Declared In
PWLocationManager.h