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.
- clone the Pubnub C# repo:
clone https://github.com/pubnub/c-sharp
- open
c-sharp/mono-for-mac/PubNub-Console/PubNub-Messaging.csproj
in Xamarin Studio - add Json.NET package (Newtonsoft.Json) from NuGet
- remove
PubnubExample.cs
to build a DLL by either removing from project or deleting - compile target to library by changing "Project Options > Build > General > Code Generation > Compile Target" to "Library" from "Executable"
- 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:
- Create a new Xamarin .NET app, e.g. Console Project
- Add
RingCentral
package from Official NuGet Gallery - Set
System.Net.Http
reference to Local Copy - 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
- Add the following to your code:
using RingCentral;
using RingCentral.Subscription; // if using subscriptions