diff --git a/kits/README.md b/kits/README.md new file mode 100644 index 000000000..ab51411bb --- /dev/null +++ b/kits/README.md @@ -0,0 +1,25 @@ +# mParticle Apple SDK — Integration Kits + +Kits forward events from the mParticle Apple SDK to partner services. To use a partner integration, add mParticle core plus the kit that matches the partner SDK major version you use. + +## How to Choose a Kit + +Kits are versioned by the partner SDK major: + +- `braze-12` → Braze Swift SDK 12.x + +Pick the kit that matches the partner SDK major you want in your app. + +## Important Note (Monorepo Paths) + +The `kits//-/` paths are how kits are organized in this repository. For your app, use the **Standalone Repository** link below (or the kit's README) to install via your dependency manager. + +## Setup Instructions + +Each kit has its own README with installation and configuration steps. + +## Available Kits + +| Kit | Standalone Repository | Partner SDK | +| -------- | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------- | +| Braze 12 | [`mparticle-apple-integration-braze-12`](https://github.com/mparticle-integrations/mparticle-apple-integration-braze-12) | [Braze Swift SDK 12.x](https://github.com/braze-inc/braze-swift-sdk) | diff --git a/kits/braze/braze-12/README.md b/kits/braze/braze-12/README.md index 48b2e8b49..e3c17d27b 100644 --- a/kits/braze/braze-12/README.md +++ b/kits/braze/braze-12/README.md @@ -1,26 +1,68 @@ -# Braze (formerly Appboy) Kit Integration +# mParticle Braze Kit (Braze Swift SDK 12.x) -This repository contains the [Braze](https://www.braze.com) integration for the [mParticle Apple SDK](https://github.com/mParticle/mparticle-apple-sdk) using the latest [Braze Swift SDK](https://github.com/braze-inc/braze-swift-sdk/). +This is the [Braze](https://www.braze.com) integration for the [mParticle Apple SDK](https://github.com/mParticle/mparticle-apple-sdk), built against the [Braze Swift SDK 12.x](https://github.com/braze-inc/braze-swift-sdk). -## Adding the integration +## Installation -1. Add the kit dependency using SPM: +### Swift Package Manager - ```swift - github "mparticle-integrations/mparticle-apple-integration-braze-12" ~> 8.0 - ``` +Add the Braze kit package dependency in Xcode or in your `Package.swift`. +Swift Package Manager resolves the `mParticle` SDK automatically as a transitive dependency, so you do not need a separate `.package` entry for `mparticle-apple-sdk`. -2. If using SPM, make sure to add the `-ObjC` flag to the target's `Other Linker Flags` setting in Xcode, according to the [Braze documentation](https://www.braze.com/docs/developer_guide/platform_integration_guides/ios/initial_sdk_setup/installation_methods/swift_package_manager#step-2-configuring-your-project). +```swift +let mParticleVersion: Version = "9.0.0" -3. Follow the mParticle iOS SDK [quick-start](https://github.com/mParticle/mparticle-apple-sdk), then rebuild and launch your app, and verify that you see `"Included kits: { Appboy }"` in your Xcode console +.package( + url: "https://github.com/mparticle-integrations/mparticle-apple-integration-braze-12", + .upToNextMajor(from: mParticleVersion) +), +``` -> (This requires your mParticle log level to be at least Debug) +Then add `mParticle-Braze` as a dependency of your target. -4. Reference mParticle's integration docs below to enable the integration. +> **Note:** Add the `-ObjC` flag to your target's **Other Linker Flags** build setting, per the [Braze documentation](https://www.braze.com/docs/developer_guide/platform_integration_guides/ios/initial_sdk_setup/installation_methods/swift_package_manager#step-2-configuring-your-project). + +For iOS push-launch tracking, initialize Braze in `application(_:didFinishLaunchingWithOptions:)` **before** starting mParticle, then pass the instance to the kit: + +```swift +import BrazeKit +import mParticle_Braze + +let configuration = Braze.Configuration( + apiKey: "[YOUR_BRAZE_API_KEY]", + endpoint: "[YOUR_BRAZE_ENDPOINT]" +) +let braze = Braze(configuration: configuration) + +MPKitBraze.setBrazeInstance(braze) +MPKitBraze.setShouldDisableNotificationHandling(true) +// Start mParticle after this. +``` + +Complete setup details (including required push delegate methods) are in the mParticle docs: + +- [mParticle Braze iOS App Launch Tracking](https://docs.mparticle.com/integrations/braze/event/#ios-app-launch-tracking) + +### Verifying the Integration + +After installing, rebuild and launch your app. With the mParticle log level set to Debug or higher, you should see the following in your Xcode console: + +```bash +Included kits: { Braze } +``` + +## Platform Support + +| Platform | Minimum Version | +| -------- | --------------- | +| iOS | 15.6 | +| tvOS | 15.6 | ## Documentation -[Braze integration](https://docs.mparticle.com/integrations/braze/event/) +- [mParticle Braze Integration Guide](https://docs.mparticle.com/integrations/braze/event/) +- [mParticle iOS SDK Documentation](https://docs.mparticle.com/developers/client-sdks/ios/) +- [Braze Swift SDK Documentation](https://www.braze.com/docs/) ## License