BubblDocs

iOS Developer Documentation

📘 Objective — To provide an iOS App Developer with an overview of the information required to implement the Bubbl Plugin into an existing app written in Objective-C or Swift.

📘 Audience — iOS App Developer

Versions

Bubbl iOS Plugin Version: 2.1
Minimum iOS Version: 15.0
Xcode Version: 14.0+
Swift Version: 5.7+

Prerequisites

  • A Bubbl Dashboard account with an active API key
  • Firebase project with Cloud Messaging enabled
  • Firebase Messaging SDK integrated - Required for FCM token generation
  • Apple Developer account with push notification capability
  • CocoaPods or manual framework integration setup

Integration Options

You can integrate the Bubbl iOS SDK using two methods. Note: These options are only for the Bubbl SDK itself—you can integrate Firebase using any method you prefer (CocoaPods, SPM, or manual).

Bubbl API Key

To integrate the plugin with your app, you will need a unique

API Key

You will find your API_KEY on the Bubbl Dashboard Company page.

Key Features

  • Geofence-based notifications: Trigger notifications when users enter/exit defined locations
  • Firebase Cloud Messaging: Uses FCM tokens for reliable push notification delivery (Firebase Messaging required)
  • Background monitoring: Continuous location tracking even when app is closed
  • Segmentation support: Target specific user groups with custom tags
  • Battery optimization: Efficient power management for location services

Required Permissions

Your app must request the following permissions:

  • Location (Always): For background geofence monitoring
  • Push Notifications: For notification delivery
  • Background Modes: Location updates capability

SDK Architecture

The Bubbl iOS SDK consists of:

  • BubblPlugin
    - Main SDK interface and initialization
  • NotificationManager
    - Handles notification presentation and taps
  • GeofenceService
    - Manages location-based triggers
  • APIService
    - Backend communication (internal)

Quick Start Guide

  1. Install the SDK via CocoaPods or manual integration
  2. Install Firebase Messaging SDK (required dependency)
  3. Configure Firebase and add
    GoogleService-Info.plist
  4. Set up Firebase Messaging delegate to receive FCM tokens
  5. Initialize Bubbl SDK only after receiving FCM token
  6. Implement delegate callbacks for authentication status
  7. Handle notification taps using NotificationManager
🔥 Firebase Messaging Required: The Bubbl SDK requires Firebase Cloud Messaging to obtain FCM tokens for push notifications. You must integrate Firebase Messaging in your app (via CocoaPods, SPM, or manual) before using Bubbl SDK.
⚠️ Critical: Always initialize the Bubbl SDK only after receiving the FCM token from Firebase. Initializing too early will prevent push notifications from working.

Support and Documentation

For detailed implementation guides, please refer to:

Respecting your app users

The Bubbl Plugin can be configured to respect app users by restricting notification features when a device’s battery reaches a lower limit; this can be set on the SDK Configurations page.