Installation using Xamarin.Mac

This covers installation of the RingCentral SDK and PubNub dependency for making event subscriptions. Both packages are hosted on NuGet as follows:

Build PubNub Messaging DLL

The following steps will compile the required libraries.

  1. clone the Pubnub C# repo: clone https://github.com/pubnub/c-sharp
  2. open c-sharp/mono-for-mac/PubNub-Console/PubNub-Messaging.csproj in Xamarin Studio
  3. add Json.NET package (Newtonsoft.Json) from NuGet
  4. remove PubnubExample.cs to build a DLL by either removing from project or deleting
  5. compile target to library by changing "Project Options > Build > General > Code Generation > Compile Target" to "Library" from "Executable"
  6. Build All (⌘B)

This builds the PubNub-Message.dll library which will be referenced in the following diectory c-sharp/mono-for-mac/PubNub-Console/bin/Release/. All files in this directory include:

JsonFx.dll
Newtonsoft.Json.dll
PubNub-Messaging.dll
PubNub-Messaging.dll.config

Create New RingCentral Xamarin .NET Solution

Perform the following steps to use the RingCentral SDK:

  1. Create a new Xamarin .NET app, e.g. Console Project
  2. Add RingCentral package from Official NuGet Gallery
  3. Set System.Net.Http reference to Local Copy
  4. Add PubNub-Messaging.dll package by editing .NET Assembly and adding the DLL.

Note: Adding System.Net.Http as a Local Copy is necessary if you run into a Could not load File or Assembly error as discussed here.

Start Coding

  1. Add the following to your code:
using RingCentral;
using RingCentral.Subscription; // if using subscriptions