Following is required to start SDK integration

Steps:


1.   From Visual Studio select “New Solution” From file Menu.


2.   Select iOS -> Library -> Binding Library and give a name to the library.


3. Xamarin  binding solution will be created like screenshot below


4. Copy libAppoxeeInapp.a & libAppoxeeSDK.a to the project folder.


5. Open libAppoxeeInapp.a and in libAppoxeeInapp.linkwith.cs file change SmartLink from true to false.


7. Open “ApiDefinition.cs” file from the sample project and copy code to the “ApiDefinition.cs” in the Xamarin app. Make sure not to change the namespace header at the top of the file.


8. Open “Struct.cs” file from the sample project and copy code to the “Struct.cs” in the Xamarin app. Make sure not to change the namespace header at the top of the file.


8. Add config.plist file to Xamarin code following link - iOS SDK Basic Automatic Integration for Mapp Cloud

9. Compile and run the application now.


10. Add New Project to the binding application by selecting “New Solution” From file Menu. Create SingleViewApplication under IOS->App.


11. Under created project add application binding as native reference.


12. Open AppDelegate.cs file and import Binding application. 

using Foundation;
using MappIosBinding;
using UIKit;


13. Open AppDelegate.cs from sample project and copy the methods required for push notifications integration.

Setup Appoxee delegates


public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
{
Appoxee.Shared().DidRegisterForRemoteNotificationsWithDeviceToken(deviceToken);
}
 
public override void DidReceiveRemoteNotification(UIApplication application, NSDictionary userInfo, Action<UIBackgroundFetchResult> completionHandler)
{
Appoxee.Shared().ReceivedRemoteNotification(userInfo);
}
 
public override void DidRegisterUserNotificationSettings(UIApplication application, UIUserNotificationSettings notificationSettings)
{
Appoxee.Shared().DidRegisterUserNotificationSettings(notificationSettings);
}



14. You must call Appoxee.Shared().EngageAndAutoIntegrateWithLaunchOptions(launchOptions, null, Server.Test) to start AppoxeeSDK. This will register the device with the Engage server and a device will be able to receive a notification.

If you want to enable in-app messages in your application you must call AppoxeeInapp.Shared().engageWithDelegate(AppoxeeInappdelegate, Inappserver.tEST). This method allows you to trigger in-app messages for specific events.


Appoxee.Shared().EngageAndAutoIntegrateWithLaunchOptions(launchOptions, null, Server.Test);
            
AppoxeeInapp.Shared().EngageWithDelegate(AppoxeeInappdelegate, Inappserver.tEST);

Appoxee.Shared().AddObserver(this, (NSString)"isReady", NSKeyValueObservingOptions.Old | NSKeyValueObservingOptions.New, (IntPtr)1);


public override void ObserveValue(NSString keyPath, NSObject ofObject, NSDictionary change, IntPtr context)
{
   if (keyPath == "isReady")
   {
       Appoxee.Shared().RemoveObserver(this, "isReady");
       locationDelegete = new LocationDelegate();
       AppoxeeLocationManager.Shared().Delegate = locationDelegete;
       AppoxeeLocationManager.Shared().LogLevel = 1;
       AppoxeeLocationManager.Shared().EnableLocationMonitoring();
   }
   else
   {
         base.ObserveValue(keyPath, ofObject, change, context);
   }
}



15. Select options from project settings


16. Check the iOS settings and make sure it looks same as screenshot below 

 

17. Provision the Xamarin application to create a build - https://developer.xamarin.com/guides/ios/getting_started/installation/device_provisioning/