Xamarin

Xamarin SDK

Installation

We recommend installing the Cobrowse.io SDK using NuGet. Add the following package to your Xamarin projects:

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. In Visual Studio, select a valid iOS device before archiving.

  2. Go to Build menu → Archive for Publishing

  3. Once done, open Xcode and go to WindowOrganizer

  4. Select the Archives tab

  5. On the left side of the window, select your app

  6. Click on Distribute App button and follow the wizard

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 hello@cobrowse.io.

Last updated