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.
Option 1: Nuget
The simplest integration method involves getting the Braze SDK Bindings from the Nuget.org central repository. In the Visual Studio sidebar, right-click
Packages folder and click
Add Packages.... Search for ‘Braze’ and install the
AppboyPlatformXamariniOSBinding package into your project.
Option 2: Source
The second 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.
Step 2: Update your App Delegate and Declare Xamarin Usage
AppDelegate.cs file, add the following snippet within your
Be sure to update
YOUR-API-KEYwith the correct value from your App Settings page.
1 2 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.
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.