iOS Point SDK  15.2.0
BDLocationManager(BDPointSDK) Category Reference

Provides Point SDK specific authentication methods and delegate properties to BDLocationManager. More...

#import <BDLocationManager+BDPointSDK.h>

+ Inheritance diagram for BDLocationManager(BDPointSDK):
+ Collaboration diagram for BDLocationManager(BDPointSDK):

Instance Methods

(void) - authenticateWithApiKey:
 
(void) - authenticateWithApiKey:requestAuthorization:
 
(void) - logOut
 
(void) - setPointDelegate:
 
(id< BDPAuthenticationDelegate > authenticationDelegate) - __attribute__
 
(void) - setZone:disableByApplication:
 
(BOOL) - isZoneDisabledByApplication:
 
(void) - applicationContainsDisabledZone:completion:
 
(NSString *) - installRef
 
(void) - notifyPushUpdateWithData:
 
(NSString *) - sdkVersion
 
(void) - setCustomEventMetaData:
 
(NSDictionary *) - customEventMetaData
 

Properties

id< BDPLocationDelegatelocationDelegate
 
id< BDPSessionDelegatesessionDelegate
 
BDAuthenticationState authenticationState
 
NSSet * zoneInfos
 
- Properties inherited from <BDPAuthenticationStateProvider>
BDAuthenticationState authenticationState
 

Detailed Description

Provides Point SDK specific authentication methods and delegate properties to BDLocationManager.

See also
details in BDLocationManager for unified documentation of the class, including this Category.

Method Documentation

◆ __attribute__()

- (id<BDPAuthenticationDelegate> authenticationDelegate) __attribute__ ((deprecated("This has been superceded by BDPSessionDelegate and will be removed in a future release."))) 
Deprecated:
This has been superceded by BDPSessionDelegate and will be removed in a future release.

Extends class BDLocationManager.

◆ applicationContainsDisabledZone:completion:()

- (void) applicationContainsDisabledZone: (NSString *)  zoneId
completion: (void(^)(BOOL))  completion 

Non-blocking method to determine if a user zone is in an enabled state.

Parameters
zoneIdzone UUID
completionclosure returns whenever zone is disabled or not

Extends class BDLocationManager.

◆ authenticateWithApiKey:()

- (void) authenticateWithApiKey: ((deprecated("First deprecated in 1.14.0 - use method authenticateWithApiKey:requestAuthorization: instead")))  __attribute__

This method has been deprecated as of version 1.14.0; it will be removed in a future version.

Deprecated:
Use authenticateWithApiKey:requestAuthorization:

Extends class BDLocationManager.

◆ authenticateWithApiKey:requestAuthorization:()

- (void) authenticateWithApiKey: (NSString *)  apiKey
requestAuthorization: (BDAuthorizationLevel)  authorizationLevel 

Authenticate, and start a session with Point Access. This behaviour is asynchronous and this method will return immediately. Progress of the authentication process can be monitored by callbacks provided via the sessionDelegate property, or the KVO-enabled authenticationState property.

Location Services are required immediately after successful authentication.

It is the responsibility of the Application to respect the authentication life-cycle and ensure that BDLocationManager is not already Authenticated, or in the process of Authenticating, while calling this method.

Parameters
apiKeyAPI Key
authorizationLevelIt is mandatory to request authorization level during SDK authentication. Requesting with "authorizedAlways" option will show iOS location permission prompt with three options, "Always", "When in use" and "Never". Requesting with "authorizedWhenInUse" option will show iOS location permission prompt with two options, "When in use" and "Never".
Exceptions
BDPointSessionExceptionCalling this method while in an invalid state will result in a BDPointSessionException being thrown.

Extends class BDLocationManager.

◆ customEventMetaData()

- (NSDictionary *) customEventMetaData

Returns the custom metadata set by calling setCustomEventMetaData.

Extends class BDLocationManager.

◆ installRef()

- (NSString *) installRef

Returns the installation reference of this Point SDK enabled App. This is the same as the Install Ref that appears in a Zone's Activity Log in Point Access, or queried via Open API. This reference is randomly generated at the first run-time of the App and remains fixed for the duration of the App installation.

Extends class BDLocationManager.

◆ isZoneDisabledByApplication:()

- (BOOL) isZoneDisabledByApplication: ((deprecated("First deprecated in 1.13 - use method applicationContainsDisabledZone:completion: instead")))  __attribute__

Blocking method to determine if a user zone is in an enabled state.

Parameters
zoneIdzone UUID.
Returns
Returns whenever zone is disabled or not
Deprecated:
Use applicationContainsDisabledZone:completion:

Extends class BDLocationManager.

◆ logOut()

- (void) logOut

Immediately ends a currently active session with Point Access. According to the authentication lifecycle, this method should only be called when authenticationState is BDAuthenticationStateAuthenticated. Otherwise, a BDPointSessionException will be thrown.

Exceptions
BDPointSessionExceptionThrown if BDLocationManager is already logged out.

Extends class BDLocationManager.

◆ notifyPushUpdateWithData:()

- (void) notifyPushUpdateWithData: (NSDictionary *)  data

Notifies Point SDK that the push notification has been received with given data.

Parameters
dataPush data passed through AppDelegate callback methods.

Extends class BDLocationManager.

◆ sdkVersion()

- (NSString *) sdkVersion

Returns the version of the Point SDK as a NSString.

Extends class BDLocationManager.

◆ setCustomEventMetaData:()

- (void) setCustomEventMetaData: (NSDictionary *)  data

Sets custom metadata for Notification events. The custom metadata set through this API will be available on the backend in checkin activity log and via webhooks. Only up to 20 custom meta data fields are allowed. Throws BDCustomEventMetadataCountException exception if the number of custom fields exceeded. Only String Type is allowed. Throws BDCustomEventMetadataDataFormatException exception if data contains non-String type.

Extends class BDLocationManager.

◆ setPointDelegate:()

- (void) setPointDelegate: (id< BDPointDelegate >)  pointDelegate

Equivalent to setting locationDelegate and sessionDelegate

.

Parameters
pointDelegateObject implementing BDPointDelegate, equivalent to both BDPSessionDelegate and BDPLocationDelegate

Extends class BDLocationManager.

◆ setZone:disableByApplication:()

- (void) setZone: (NSString *)  zoneId
disableByApplication: (BOOL)  disable 

Disabled or re-enable a specific zone. Information about valid zones, including their respective zoneId's for use in this method, is delivered to didUpdateZoneInfo: (BDPLocationDelegate-p).

Extends class BDLocationManager.

Property Documentation

◆ authenticationState

- (BDAuthenticationState) authenticationState
readatomicassign

Read-only property, providing the current authentication authenticationState. This property is KVO compliant, meaning that it can be observed for changes with Key-Value Observing.

Extends class BDLocationManager.

◆ locationDelegate

- (id<BDPLocationDelegate>) locationDelegate
readwriteatomic

Extends class BDLocationManager.

◆ sessionDelegate

- (id<BDPSessionDelegate>) sessionDelegate
readwriteatomic

Applications using Point SDK must authenticate before using its features.

Which classes and methods require authentication is set out clearly in the API documentation. Authentication is performed simply by calling authenticateWithApiKey: with the API credentials provided in your Point Access management portal.

Implement the callbacks in your own implementation of BDPSessionDelegate, and assign it to this property to receive feedback on the outcome of authentication, and to tell your application when it can start fully using Point SDK. Attempting to call protected features when not authenticated will case a BDPointSessionException to be thrown.

Extends class BDLocationManager.

◆ zoneInfos

- (NSSet*) zoneInfos
readnonatomicassign

A collection of BDZoneInfo objects, corresponding to the Zones you created for this application, in the Point Access web-interface.

Extends class BDLocationManager.