Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.

Matchmore .NET SDK

Matchmore is a contextualized publish/subscribe model which can be used to model any geolocated or proximity based mobile applications. Save time and make development easier by using our SDK.


You can install the SDK directly from Nuget for .NET Standard

Or for xamarin builds For Xamarin we come with some defaults for your application and accessing location services and persisting state.


Setup application API key and world, get it for free from

async Task SetupMatchmore()
    await Matchmore.SDK.Matchmore.ConfigureAsync("YOUR_API_KEY");

If you are using the sdk in a server application or similar, please refer to the customization section

Create first device, publication and subscription. Please note that we're not caring about errors right now.

//call this before you can operate on default operations
await Matchmore.SDK.Matchmore.Instance.SetupMainDeviceAsync();

//this will only work if you are using the xamarin package or provide your own custom ILocationService

//you can access the device later by calling Matchmore.SDK.Matchmore.Instance.MainDevice
var sub = new Subscription
            Topic = "Test Topic",
            Duration = 30,
            Range = 100,
            Selector = "test = true and price <= 200"

var createdPub = await Matchmore.SDK.Matchmore.Instance.CreateSubscriptionAsync(sub);

var pubDevice = await Matchmore.SDK.Matchmore.Instance.CreateDeviceAsync(new MobileDevice
                Name = "Publisher"

var pub = new Publication
			Topic = "Test Topic",
			Duration = 30,
			Range = 100,
			Properties = new Dictionary<string, object>(){
				{"test", true},
				{"price", 199}
//you can pass explicitly the device you would want to use
var createdPub = await Matchmore.SDK.Matchmore.Instance.CreatePublicationAsync(pub, pubDevice);

To receive matches, you need to create a monitor

//default params of .SubscribeMatches() use your main device and Polling as a channel delivery mechanism
var monitor = Matchmore.SDK.Matchmore.Instance.SubscribeMatches();
monitor.MatchReceived += (object sender, MatchReceivedEventArgs e) => {
    //handle your match

//if  you don't have access to your monitor, you can attach the event handler on the Matchmore Instance
Matchmore.SDK.Matchmore.Instance.MatchReceived += (object sender, MatchReceivedEventArgs e) => {
    //handle your match, the sender will be your monitor

Third party match providers(APNS and FCM)

To use your match provider of your choice, you need to wire it differently depending on the platform.

First you need to provide the token for the platform(FCM or APNS) to Matchmore so we know where to route the match id

Matchmore.SDK.Matchmore.Instance.UpdateDeviceCommunicationAsync(new Matchmore.SDK.Communication.FCMTokenUpdate("token taken from FCM"));
//basing of

[IntentFilter(new[] { "" })]
public class MyFirebaseIIDService : FirebaseInstanceIdService
    const string TAG = "MyFirebaseIIDService";
    public override void OnTokenRefresh()
        var refreshedToken = FirebaseInstanceId.Instance.Token;
        Log.Debug(TAG, "Refreshed token: " + refreshedToken);
        Matchmore.SDK.Matchmore.Instance.UpdateDeviceCommunicationAsync(new Matchmore.SDK.Communication.FCMTokenUpdate(refreshedToken));

Matchmore.SDK.Matchmore.Instance.UpdateDeviceCommunicationAsync(new Matchmore.SDK.Communication.APNSTokenUpdate("token taken from APNS"));
//basing of
public override void RegisteredForRemoteNotifications (UIApplication application, NSData deviceToken)
	Matchmore.SDK.Matchmore.Instance.UpdateDeviceCommunicationAsync(new Matchmore.SDK.Communication.APNSTokenUpdate(deviceToken.ToString()));

Then you need to tell Matchmore whenever you will get a match id to retrieve.

//android fcm
[IntentFilter(new[] { "" })]
public class MyFirebaseMessagingService : FirebaseMessagingService

    IMatchProviderMonitor matchProviderMonitor = Matchmore.SDK.Matchmore.Instance.SubscribeMatchesWithThirdParty();
    const string TAG = "MyFirebaseMsgService";
    public override void OnMessageReceived(RemoteMessage message)

//ios apns in your AppDelegate
public override void ReceivedRemoteNotification (UIApplication application, NSDictionary userInfo)
    IMatchProviderMonitor matchProviderMonitor = Matchmore.SDK.Matchmore.Instance.SubscribeMatchesWithThirdParty();
    var matchId = userInfo["matchId"].ToString();


The shown ConfigureAsync method is a shorthand, you can pass config object contain more information, like implementations for location services, state repositories

await Matchmore.SDK.Matchmore.ConfigureAsync(new GenericConfig {
                ApiKey = "YOUR_API_KEY",
                LocationService = myLocationService, //implements ILocationService
                StateManager = myStateManager, // implements IStateRepository

Additional info you might find useful how to setup APNS. fcm in xamarin apns in xamarin


See the or consult our website for further information


To run tests for .NET Standard use dotnet command line utility

dotnet test Matchmore.SDK.NetStandard.Tests/Matchmore.SDK.NetStandard.Tests.csproj

Other devices can be run from visual studio



Matchmore is available under the MIT license. See the LICENSE file for more info.


Matchmore .NET SDK






No packages published