AppboyKit (also known as the Objective-C SDK) is no longer supported and has been replaced by the Swift SDK. It will no longer receive new features, bug fixes, security updates, or technical support—however, messaging and analytics will continue to function as normal. To learn more, see Introducing the New Braze Swift SDK.
Manual integration
We strongly recommend that you implement the SDK via a package manager such as Swift Package Manager, CocoaPods, or Carthage. It will save you a lot of time and automate much of the process. However, if you are unable to do so, you may complete the integration manually by following the instructions.
Step 1: Downloading the Braze SDK
Option 1: Dynamic XCFramework
- Download
Appboy_iOS_SDK.xcframework.zip
from the release page and extract the file. - In Xcode, drag and drop this
.xcframework
into your project. - Under the General tab of the project, select Embed & Sign for
Appboy_iOS_SDK.xcframework
.
Option 2: Static XCFramework for static integration
- Download
Appboy_iOS_SDK.zip
from the release page. - In Xcode, from the project navigator, select the destination project or group for Braze
- Navigate to File > Add Files > Project_Name.
- Add the
AppboyKit
andAppboyUI
folders to your project as a group.- Make sure that the Copy items into destination group’s folder option is selected if you are integrating for the first time. Expand Options in the file picker to select Copy items if needed and Create groups.
- Delete the
AppboyKit/include
andAppboyUI/include
directories.
- (Optional) If one of the following applies to you:
- You only want the core analytics features of the SDK and do not use any UI features (for example, in-app messages or Content Cards).
- You have custom UI for Braze UI features and handle the image downloading yourself.
You can use the core version of the SDK by removing the fileABKSDWebImageProxy.m
andAppboy.bundle
. This will remove theSDWebImage
framework dependency and all the UI-related resources (for example, Nib files, images, localization files) from the SDK.
If you try to use the core version of the SDK without Braze UI features, in-app messages will not display. Trying to display Braze Content Cards UI with the core version will lead to unpredictable behavior.
Step 2: Adding required iOS libraries
- Click on the target for your project (using the left-side navigation), and select the Build Phases tab.
- Click the button under Link Binary With Libraries.
- In the menu, select
SystemConfiguration.framework
. - Mark this library as required using the pull-down menu next to
SystemConfiguration.framework
. - Repeat to add each of the following required frameworks to your project, marking each as “required”.
QuartzCore.framework
libz.tbd
CoreImage.framework
CoreText.framework
WebKit.framework
- Add the following frameworks and mark them as optional:
CoreTelephony.framework
- Select the Build Settings tab. In the Linking section, locate the Other Linker Flags setting and add the
-ObjC
flag. - The
SDWebImage
framework is required for Content Cards and in-app messaging to function properly.SDWebImage
is used for image downloading and displaying, including GIFs. If you intend to use Content Cards or in-app messages, follow the SDWebImage integration steps.
SDWebImage integration
To install SDWebImage
, follow their instructions and then drag and drop the resulting XCFramework
into your project.
Optional location tracking
- Add the
CoreLocation.framework
to enable location tracking. - You must authorize location for your users using
CLLocationManager
in your app.
Step 3: Objective-C bridging header
If your project only uses Objective-C, skip this step.
If your project uses Swift, you will need a bridging header file.
If you do not have a bridging header file, create one and name it your-product-module-name-Bridging-Header.h
by choosing File > New > File > (iOS or OS X) > Source > Header File. Then, add the following line of code to the top of your bridging header file:
1
#import "AppboyKit.h"
In your project’s Build Settings, add the relative path of your header file to the Objective-C Bridging Header
build setting under Swift Compiler - Code Generation
.
Next steps
Follow the instructions for completing the integration.