Skip to content

malandr2/braze-growth-shares-ios-demo-app

 
 

Repository files navigation

A Braze SDK implementiation Swift iOS Application

Table of Contents

About Braze Demo

The focus of this application demonstrates how to decouple any dependencies on Appboy-iOS-SDKfrom the rest of your existing production code. One objective was for there to be only one import Appboy-iOS-SDK in the entire application.

All of the Braze-related dependencies are handled in the AppboyManager.swift file that the existing production code calls into.

In doing do, this project demonstrates the abilities of how custom objects can be represented as Content Cards. This project also demonstrates how to natively customize In-App Message with subclassed ABKInAppMessageViewControllers.

Content Cards

Objects can adopt the ContentCardable protocol which comes with the ContentCardData object and an initializer. Upon receiving an array of ABKContentCard objects from the SDK, the corresponding ABKContentCard objects are converted into a Dictionary of metadata that are used to instantiate your custom objects.

This demo highlights 4 Content Card uses cases:

  1. Content Cards as Supplemental Content to an existing feed
  2. Content Cards as an Inline Ad Banner
  3. Content Cards as a Message Center
  4. Content Cards as an Interact-able View

Extra use cases:

  1. Content Cards that can be inserted/removed to/from an existing feed in real-time via silent push (device only)
  2. Content Cards that can be reordered in an existing feed in real-time via silent push (device only)

In-App Messages

Custom view controllers can represent in-app messages by subclassing ABKInAppMessageViewController. Due to the individusalitic nature of in-app messages, we can mix and match displaying custom in-app messages and default in-app messages.

This demo highlights 3 in-app message uses cases:

  1. Slideup In-App Message with a modified resting point
  2. Modal In-App Message as a dynamic list
  3. Full In-App Message as a push primer with list of push tags

Using the Project

  1. Replace "YOUR-API-KEY" with your Braze API key here
  2. Replace the Appboy/Endpoint value with your Appboy endpoint here
  3. Replace "YOUR-CONTENT-BLOCK-API-KEY" with your Braze Content Block API Key here
  4. For an API Triggered Campaign:
    • Replace "YOUR-CAMPAIGN-API-KEY" with your Braze campaign API key here
    • Replace "YOUR-CAMPAIGN-ID" with your Braze campaign ID here

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%