iOS SDK 15.6.7,
Android SDK 15.5.3,
Hello Screen Dynamic States,
Bluedot Cordova plugin 4.0.1,
Bluedot Xamarin Android wrapper 15.5.2,
Bluedot Xamarin iOS wrapper 15.6.6,
Bluedot React Native wrapper 2.3.0,
This documentation depends on Bluedot PointSDK and CleverTap SDK. Both dependencies can be managed by CocoaPods or Carthage.
You can find detailed instructions at https://docs.bluedot.io/ios-sdk/ios-quick-start
import BDPointSDK
BDPGeoTriggeringEventDelegate
:
// Swift extension YourClass: BDPGeoTriggeringEventDelegate { func didEnterZone(_ enterEvent: BDZoneEntryEvent) { // Your logic when the device enters a Bluedot Zone } func didExitZone(_ exitEvent: BDZoneExitEvent) { // Your logic when the device leaves a Bluedot Zone } }
// Swift let instanceOfYourClass = YourClass() BDLocationManager.instance()?.geoTriggeringEventDelegate = instanceOfYourClass
// Swift BDLocationManager.instance()?.initialize(withProjectId: projectId){ error in guard error == nil else { print("There was an error initializing the Bluedot SDK: \(error.localizedDescription)") return } }
Import CleverTap-iOS-SDK to your class
// Swift import CleverTapSDK
Then start CleverTap within the application:didFinishLaunchingWithOptions
method.
// Swift CleverTap.autoIntegrate()
Track CleverTap custom events in your Bluedot Entry / Exit events.
func didEnterZone(_ enterEvent: BDZoneEntryEvent) { // Name the custom event let customEventName = YOUR CUSTOM EVEN NAME // Map the Location and Zone attributes into a properties dictionary var properties = [ "bluedot_zone_id": "\(enterEvent.zone().id!)", "bluedot_zone_name": "\(enterEvent.zone().name!)" ] // Map the Custom Data attributes into properties if let custData = enterEvent.zone().customData, !custData.isEmpty { custData.forEach { data in properties["\(data.key)"] = "\(data.value)"} } // Log the Custom Event in CleverTap CleverTap.sharedInstance()?.recordEvent(customEventName, withProps: properties) }