iOS SDK Method Reference
Reference for BubblPlugin and NotificationManager core integration methods.
Startup and Registration
BubblPlugin.shared.start(apiKey:env:segmentations:delegate:)
Starts SDK runtime and device registration.
BubblPlugin.updateAPNsToken(_ token: Data)
Updates APNs token used for push routing.
BubblPlugin.updateFCMToken(_ token: String)
Updates FCM token. Call when Firebase token changes.
Configuration and Privacy
fetchConfiguration(forceRefresh:completion:)
Fetches latest configuration from backend.
getCurrentConfiguration() -> BubblConfiguration?
Returns currently cached configuration.
getPrivacyText() -> String
Returns cached privacy text.
refreshPrivacyText(completion:)
Refreshes privacy text from backend.
Location and Permissions
requestLocationWhenInUse()
Triggers when-in-use prompt.
requestLocationAlways()
Triggers always-location prompt.
requestPushPermission()
Triggers push permission prompt.
refetchGeofence()
Refreshes geofences using current SDK logic.
locationAuthorizationPublisher
Combine publisher for location authorization updates.
pushAuthorizationPublisher
Combine publisher for push authorization updates.
polygonsPublisher
Combine publisher for active geofence polygons.
Segmentation
updateSegments(segmentations:completion:)
Updates device segmentation tags.
Correlation ID
setCorrelationId(_ correlationId: String)
Sets or overrides the persistent correlation_id value for the current install.
getCorrelationId() -> String
Returns the stored correlation_id value, or empty string if unset.
clearCorrelationId()
Clears the stored correlation_id value.
Notification and Event Tracking
NotificationManager.shared.publisher
Publisher of parsed BubblNotificationDetails payloads.
NotificationManager.shared.trackCTAEngagement(notificationID:locationID:)
Tracks CTA engagement.
NotificationManager.shared.trackMediaView(notificationID:locationID:)
Tracks media view event.
trackSurveyEvent(notificationId:locationId:activity:completion:)
Tracks survey/notification lifecycle activity.
submitSurveyResponse(notificationId:locationId:answers:completion:)
Submits survey answers.
NotificationManager.shared.sendTestNotification()
Local test notification helper for host-app validation.
Debugging
BubblPlugin.shared.logFileURL
SDK log file path.
BubblPlugin.shared.clearLogs()
Clears SDK log file.
NotificationManager.shared.clearLatest()
Clears last in-memory notification payload.