Xamarin (Android/ iOS)
Step by step guide to help you with Leap Xamarin SDK Integration

This guide will help you set up the Leap platform for Android and iOS devices. You can follow the steps below to integrate Leap SDK before using your dashboard to create in-app experiences.

SDK Installation

Note: Ensure that you complete both the steps in order to create and test the in-app experience in your integrated build.

Step 1. Integrate Leap SDK

1.a Add Leap Xamarin SDK dependency

Add Leap Xamarin Library package from nuget.
Android
iOS
Add LeapXamarinLib.Android package from nuget to the Packages in your Android specific project.
For the Latest Xamarin Android Release Notes check here
Add LeapXamarinLib.iOS package from nuget to the Packages in your iOS specific project.
For the Latest Xamarin iOS Release Notes check here

1.b Start Leap SDK

Android
iOS
using IS.Leap.Android.Aui;
namespace YourApp
{
[Activity(Label = "@string/app_name", Theme = "@style/AppTheme.NoActionBar", MainLauncher = true)]
public class MainActivity : AppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
Leap.Start("<YOUR_API_KEY>");
}
}
}
[Export("application:didFinishLaunchingWithOptions:")]
public bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
// Override point for customization after application launch.
// If not required for your application you can safely delete this method
Leap.Shared.Start("<YOUR_API_KEY>");
return true;
}

Step 2. Enable 'Creator mode' in your app

To create in-app experiences in the Leap Studio, you will need to enable the 'Creator mode' in your app. This can be done by integrating the Leap Creator SDK.
2.a Add Dependencies
Note - The Leap Creator SDK must be removed before going live to PlayStore/App Store
Add Leap Xamarin Creator package from nuget
Android
iOS
Add LeapXamarinLib.Android.Creator package from nuget to the Packages in your Android specific project.
For the Latest Xamarin Android Release Notes check here
Add LeapXamarinLib.iOS.Creator package from nuget to the Packages in your iOS specific project.
For the Latest Xamarin iOS Release Notes check here
2.b Start Leap Creator SDK
Android
iOS
using IS.Leap.Android.Creator;
namespace YourApp
{
[Activity(Label = "@string/app_name", Theme = "@style/AppTheme.NoActionBar", MainLauncher = true)]
public class MainActivity : AppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
LeapCreator.Start("<YOUR_API_KEY>");
}
}
}
[Export("application:didFinishLaunchingWithOptions:")]
public bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
// Override point for customization after application launch.
// If not required for your application you can safely delete this method
LeapCreator.Shared.Start("<YOUR_API_KEY>");
return true;
}
Copy link