- 13 May 2024
- 1 Minute To Read
-
Print
-
DarkLight
-
PDF
Integrate Whatfix Mobile SDK with Xamarin iOS
- Updated On 13 May 2024
- 1 Minute To Read
-
Print
-
DarkLight
-
PDF
To create Whatfix Mobile in-app experiences on your Xamarin iOS apps, you need to first set up Whatfix Mobile. You can add the Whatfix Mobile SDK provided for Xamarin iOS apps to the source code of your app and then create and publish content.
Integration steps for Xamarin iOS app
Use the following steps to integrate the Whatfix Mobile SDK in your Xamarin iOS project:
Ensure that you complete both the steps, to create and test the in-app experience in your integrated build.
Step 1: Integrate Whatfix Mobile SDK
a. Add the Whatfix Mobile Xamarin SDK dependency
Add the Whatfix Mobile Xamarin Library package from nuget.
Add the LeapXamarinLib.iOS package from nuget to the Packages in your iOS specific project.
For more information on the latest version of the Xamarin iOS project, see Xamarin iOS Changelog
b. Start the Whatfix Mobile SDK
[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 Whatfix Mobile Studio, you have to enable the Creator mode in your app. This is done by integrating the Whatfix Mobile Creator SDK.
a. Add dependencies
- The Whatfix Mobile Creator SDK must be removed before the app goes live on the App Store.
- While both Whatfix Mobile Creator SDK and Whatfix Mobile SDK need to be integrated in the development and testing versions, the production version should only have the Whatfix Mobile SDK.
Add the Whatfix Mobile Xamarin Creator package from nuget.
Add LeapXamarinLib.iOS.Creator package from nuget to the Packages in your iOS specific project.
For more information on the latest version of the Xamarin iOS project, see Xamarin iOS Changelog
b. Start the Whatfix Mobile Creator SDK
[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;
}
After integrating the code, you can start creating your in-app experience using Whatfix Mobile.