Initial SDK Setup
Installing the Braze SDK will provide you with basic analytics functionality as well as working in-app messages with which you can engage your users.
Step 1: Get the Xamarin binding
A Xamarin binding is a way to use native libraries in Xamarin apps. The implementation of a binding consists of building a C# interface to the library, and then using that interface in your application.
There are two ways to include the Braze SDK binding.
The first integration method is to include the binding source found here. In our github repo you will find our binding source code; adding a project reference to the
AppboyPlatformXamariniOSBinding.csproj in your Xamarin application will cause the binding to be built with your project and provide you access to the Braze iOS SDK. Please make sure “AppboyPlatformXamariniOSBinding” is showing in your project’s “Reference” folder.
The second integration method involves getting the Braze SDK Bindings component from the Xamarin Component store. In your application, if you right click the Components folder and click
Get More Components you will be taken to the component store. Search for ‘Braze’ and install the component into your project.
Note: We link SDWebImage with our SDK inside of our binding project. If you need a different version of SDWebImage in your application and it is conflicting with our binding, you can manually update the libSDWebImage.a file in our binding project.
Step 2: Update your App Delegate and Declare Xamarin Usage
AppDelegate.cs file, add the following snippet within your
Note: Be sure to update
YOUR-API-KEY with the correct value from your App Settings page.
Appboy.StartWithApiKey ("YOUR-API-KEY", UIApplication.SharedApplication, options); Appboy.SharedInstance.SdkFlavor = ABKSDKFlavor.Xamarin;
AppDelegate.cs file in the TestApp.XamariniOS sample app.
SDK Integration Complete
Braze should now be collecting data from your application and your basic integration should be complete. Please see the following sections in order to enable custom event tracking, push messaging, the news-feed and the complete suite of Braze features.
Note: Our current public Xamarin binding for the iOS SDK does not connect to the iOS Facebook SDK (linking social data) and does not include sending the IDFA to Braze.