Links

Xamarin

Xamarin SDK

Installation

Looking for net6.0-android and net6.0-ios support? Please email us
We recommend installing the Cobrowse.io SDK using NuGet. Add the following package to your Xamarin projects:
Xamarin.iOS
Xamarin.Android
Xamarin.Forms
To use Cobrowse.io in your Xamarin.iOS project, please add the following lines to your AppDelegate.cs:
using Xamarin.CobrowseIO;
[Register("AppDelegate")]
public class AppDelegate : UIResponder, IUIApplicationDelegate
{
[Export("application:didFinishLaunchingWithOptions:")]
public bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
CobrowseIO.Instance.License = "put your license key here";
CobrowseIO.Instance.Start();
return true;
}
}
Xamarin.iOS Swift support
Cobrowse.io SDK uses Swift language, and if you are targeting iOS 12.1 or earlier, it is required to add Xamarin.iOS.SwiftRuntimeSupport NuGet dependency to ship specific Swift dylibs used by Cobrowse with your application.
This NuGet copies the necessary Swift libraries in the right place when building your app or when generating the archive of the app (not the IPA).
This NuGet, however, does not copy the Swift libraries in the right place when generating the IPA using Visual Studio, causing the rejection of the App Store when uploading the IPA. Please follow Xamarin documentation describing how to build and publish your Xamarin.iOS application using the Xcode IPA wizard. The steps are:
  1. 1.
    In Visual Studio, select a valid iOS device before archiving.
  2. 2.
    Go to Build menu → Archive for Publishing
  3. 3.
    Once done, open Xcode and go to WindowOrganizer
  4. 4.
    Select the Archives tab
  5. 5.
    On the left side of the window, select your app
  6. 6.
    Click on Distribute App button and follow the wizard
To use Cobrowse.io in your Xamarin.Android project, please add the following lines to your Application subclass.
using Xamarin.CobrowseIO;
[Application]
public class MainApplication : Application
{
public override void OnCreate()
{
base.OnCreate();
CobrowseIO.Instance.License = "put your license key here";
CobrowseIO.Instance.Start(this);
}
}
Important:
  • Also make sure you are targeting Android 10 (API 29). In Visual Studio:
    • Open the project settings
    • Navigate to BuildGeneral
    • In "Compile using Android version: (Target Framework)" drop-down list choose Android 10.0 (Q)
  • The Cobrowse.io SDK uses AndroidX, so make sure you have migrated to AndroidX
You may also start CobrowseIO in your MainActivity or other Activity if necessary. In that case, the SDK will continue to function even as new Activities are being created and destroyed.
Alternatively, it is possible to access Cobrowse.io features from Xamarin.Forms projects. In this case you only need to initialize the Cobrowse.io SDK in your cross-platform project:
using Xamarin.CobrowseIO.Abstractions;
public partial class App : Xamarin.Forms.Application
{
public App()
{
InitializeComponent();
CobrowseIO.Instance.License = "put your license key here";
CobrowseIO.Instance.Start();
}
}

Add your License Key

Please register an account and generate your free License Key at https://cobrowse.io/dashboard/settings.
This will associate sessions from your mobile app with your Cobrowse account.

Xamarin sample app

We provide a sample application showing how to use Cobrowse.io NuGet packages in Xamarin. Xamarin.Forms sample includes using 6-digit codes, full device screen sharing, and redacting sensitive data. Xamarin Classic sample is also available.

Try it out

Once you have your app running in the iOS Simulator or on a physical device, navigate to https://cobrowse.io/dashboard to see your device listed. You can click the "Connect" button to initiate a Cobrowse session!

Requirements

  • iOS 11.0 or later
  • Android API version 19 (4.4 KitKat) or later
Any questions at all? Please email us at [email protected].

.NET MAUI

This is currently on our roadmap. If this is of intrest to you please do let us know at [email protected]. In the meantime you should be able to use our Xamarin library within your MAUI applications.