iOS SDK version 15.1.1,
Android SDK version 14.0.0 &
Point Access UI
version 1.11.0 released.
iOS – Programming a minimal Point SDK app
BDLocationManager is the entry-point for an app to start using Point SDK.
Point SDK acts upon rules that are defined via the Point Access web-interface. To enable these within an application, it is necessary to call the authentication method on the shared instance of BDLocationManager. An API key is used as the parameter.
Calling the authentication method will start a session with Point Access. However, it’s not required to call this method after app restart, unless the user has been logged out. Initialising an SDK in AppDelegate make the enhanced restart mode work correctly.
Zones will be downloaded, and associated Actions will be executed by the library without any further intervention. In general, the singleton instance of BDLocationManager should be used wherever the standard Core Location CLLocationManager class would otherwise be used.
BDLocationManager exposes properties for two delegates, in addition to the standard
delegate property inherited from CLLocationManager:
The most notable of these additional features are:
- Session Delegate – the BDPSessionDelegate protocol provides callbacks informing the application when Point SDK’s authentication state changes. The rules defined in Point Access will only be observed while authenticated. Also, some methods of Point SDK classes may just be called while the application is in the authenticated state and will otherwise cause an exception to be thrown. Such restrictions are documented clearly in this API reference. It is only necessary to authenticate once during the runtime of the application.
- Location Delegate – following the delegate pattern familiar throughout Apple’s Cocoa Touch frameworks, the
locationDelegateproperty of BDLocationManager provides callbacks to notify an application when:
a. zone information is received. This typically occurs immediately after the authentication process completes.
b. Any Custom Actions defined in Point Access are triggered, in real-time.
Either of two call-backs will be made, depending on whether a check-in was triggered by the device entering a Geofence or the proximity of a Beacon.
- (void)didCheckIntoFence:inZone:atCoordinate:onDate:willCheckOut: - (void)didCheckIntoBeacon:inZone:withProximity:onDate:willCheckOut:
c. Following (b), if the willCheckOut flag was set to true, either of the following corresponding call-backs will also be made when the device leaves the checked-in area:
- (void)didCheckOutFromFence:inZone:onDate:withDuration: - (void)didCheckOutFromBeacon:inZone:withProximity:onDate:withDuration:
iOS SDK version 15.1.1,