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,
You can find our Bluedot – Airship iOS Example on GitHub or follow the steps below to integrate Airship and Bluedot PointSDK.
application:didFinishLaunchingWithOptions:
method in your AppDelegate
.// Create Airship config let config = Config() // Set production and development separately. // Alternatively you can use AirshipConfig.plist file to store all Airship configurations. // More details please see https://docs.airship.com/platform/mobile/setup/sdk/ios/ config.developmentAppKey = "YOUR DEV APP KEY" config.developmentAppSecret = "YOUR DEV APP SECRET" config.productionAppKey = "YOUR PRODUCTION APP KEY" config.productionAppSecret = "YOUR PRODUCTION APP SECRET" // Change to true to use the production appKey/appSecret config.inProduction = false // Set site. Either .us or .eu config.site = .us // Allow lists. Use * to allow anything config.urlAllowList = ["*"] // Call takeOff Airship.takeOff(config, launchOptions: launchOptions) // User notifications will not be enabled until userPushNotificationsEnabled is // set YES on UAPush. Once enabled, the setting will be persisted and the user // will be prompted to allow notifications. Normally, you should wait for a more // appropriate time to enable push to increase the likelihood that the user will // accept notifications. Airship.push.userPushNotificationsEnabled = true
import BDPointSDK
BDLocationManager
which is the entry-point for an app to start using PointSDK.
BDLocationManager.instance()?.geoTriggeringEventDelegate = self
if BDLocationManager.instance()?.isInitialized() == false { BDLocationManager.instance()?.initialize( withProjectId: projectId) { error in guard error == nil else { print("Initialisation Error: \(String(describing: error?.localizedDescription))") return } print( "Initialised successfully with Point sdk" ) } }
BDLocationManager.instance()?.startGeoTriggering() { error in guard error == nil else { print("There was an error starting geo-triggering with the Bluedot SDK: \(error.localizedDescription)") return } }
extension AppDelegate: BDPGeoTriggeringEventDelegate { func didEnterZone(_ enterEvent: BDZoneEntryEvent){ print("I have entered a zone.") } func didExitZone(_ exitEvent: BDZoneExitEvent) { print("I have exited a zone") } }
Only Custom Actions
defined for a Zone will trigger Check-in and Check-out callbacks.
Check-out
does not apply to Geoline™.
Objective: Trigger an automated message
pushed to end-user when the device checks in a geofence
or Geoline™
.
Setting automated message: Setup via Airship
portal will be triggered when a new event is posted.
func didEnterZone(_ enterEvent: BDZoneEntryEvent){ let customEvent = CustomEvent(name:"bluedot_place_entered") customEvent.interactionType = "location" customEvent.interactionID = enterEvent.zone().id // Set Bluedot Zone Custom Data var bluedotProperties = [String : String]() enterEvent.zone().customData?.forEach { (key, value) in bluedotProperties[key] = value } bluedotProperties["bluedot_zone_name"] = enterEvent.zone().name // assign custom event properties customEvent.properties = bluedotProperties // Record the event in analytics customEvent.track() } func didExitZone(_ exitEvent: BDZoneExitEvent) { let customEvent = CustomEvent(name:"bluedot_place_exited") customEvent.interactionType = "location" customEvent.interactionID = exitEvent.zone().id // Set Bluedot Zone Custom Data var bluedotProperties = [String : String]() exitEvent.zone().customData?.forEach { (key, value) in bluedotProperties[key] = value } bluedotProperties["bluedot_zone_name"] = exitEvent.zone().name // set dwell time bluedotProperties["dwell_time"] = NSNumber(value: exitEvent.duration).stringValue // assign custom event properties customEvent.properties = bluedotProperties // Record the event in analytics customEvent.track() }