Contents

braze-inc/braze-swift-sdk

Braze SDK for the Apple ecosystem, including: iOS, macOS, iPadOS, visionOS, tvOS

Quickstart

// AppDelegate.swift
import BrazeKit

class AppDelegate: UIResponder, UIApplicationDelegate {
  // ...
  static var braze: Braze? = nil

  // ...
   func application(
      _ application: UIApplication, 
      didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    ) -> Bool {
        // ...
        let configuration = Braze.Configuration(
            apiKey: "YOUR-APP-IDENTIFIER-API-KEY",
            endpoint: "YOUR-BRAZE-ENDPOINT"
        )
        let braze = Braze(configuration: configuration)

        AppDelegate.braze = braze
        // ...
    }
}
AppDelegate.braze?.changeUser(userId: "Jane Doe")

See the Braze Developer Guide for advanced integration options.

Version Support

Tool | Minimum Supported Version :----|:---- iOS|12.0+ Mac Catalyst|13.0+ tvOS|12.0+ visionOS|1.0+ Xcode|16.0+ (16A242d)

Package Managers

  • Swift Package Manager
  • CocoaPods

Libraries

| | iOS | tvOS | macCatalyst | visionOS | |-----------------------------------------------------------------------------------------------------------------------------|:---:|:-------------:|:-----------:|:-------------:| | BrazeKit</br> Main SDK library providing support for [analytics] and [push notifications]. | ✅ | ✅<sup>1</sup> | ✅ | ✅ | | BrazeUI</br> Braze-provided user interface library for [In-App Messages] and [Content Cards]. | ✅ | n/a | ✅ | ✅ | | BrazeLocation</br> Location library providing support for [location analytics and geofence monitoring]. | ✅ | ✅<sup>2</sup> | ✅ | ✅<sup>2</sup> | | BrazeNotificationService</br> Notification service extension library providing support for [rich push notifications]. | ✅ | n/a | ✅ | ✅ | | BrazePushStory</br> Notification content extension library providing support for [Push Stories]. | ✅ | n/a | ✅ | ✅ |

<sup>1</sup> Push notifications not supported on tvOS</br> <sup>2</sup> Geofence monitoring not supported on tvOS and visionOS

[analytics]: https://www.braze.com/docs/user_guide/data_and_analytics/user_data_collection/sdk_data_collection/ [push notifications]: https://www.braze.com/docs/user_guide/message_building_by_channel/push [In-App Messages]: https://www.braze.com/docs/user_guide/message_building_by_channel/in-app_messages [Content Cards]: https://www.braze.com/docs/user_guide/message_building_by_channel/content_cards [location analytics and geofence monitoring]: https://www.braze.com/docs/user_guide/engagement_tools/locations_and_geofences [rich push notifications]: https://www.braze.com/docs/user_guide/message_building_by_channel/push/ios/rich_notifications/ [Push Stories]: https://www.braze.com/docs/user_guide/message_building_by_channel/push/advanced_push_options/push_stories/

Examples

Explore our examples project which showcases multiple features' integrations.

Alternative Repositories

| Variant | Repository | GH Issues, SDK info | |---------------------------------------|-----------------------------------------------:|--------------------:| | → Sources and Static XCFrameworks | [braze-inc/braze-swift-sdk] | ✓ | | Static XCFrameworks | [braze-inc/braze-swift-sdk-prebuilt-static] | ✗ | | Dynamic XCFrameworks | [braze-inc/braze-swift-sdk-prebuilt-dynamic] | ✗ | | Mergeable XCFrameworks (early access) | [braze-inc/braze-swift-sdk-prebuilt-mergeable] | ✗ |

Contact

If you have questions, please contact support@braze.com.

[braze-inc/braze-swift-sdk]: https://github.com/braze-inc/braze-swift-sdk [braze-inc/braze-swift-sdk-prebuilt-static]: https://github.com/braze-inc/braze-swift-sdk-prebuilt-static [braze-inc/braze-swift-sdk-prebuilt-dynamic]: https://github.com/braze-inc/braze-swift-sdk-prebuilt-dynamic [braze-inc/braze-swift-sdk-prebuilt-mergeable]: https://github.com/braze-inc/braze-swift-sdk-prebuilt-mergeable

Package Metadata

Repository: braze-inc/braze-swift-sdk

Homepage: https://www.braze.com

Stars: 70

Forks: 24

Open issues: 13

Default branch: main

Primary language: swift

License: Other

Topics: braze, cocoapods, customer-engagement, in-app-messaging, ios, mac-catalyst, macos, marketing-automation, push-notifications, sdk, swift, swift-package-manager, tvos

README: README.md