Expo.Server.SDK
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Expo.Server.SDK --version 1.0.0
NuGet\Install-Package Expo.Server.SDK -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Expo.Server.SDK" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Expo.Server.SDK --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Expo.Server.SDK, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Expo.Server.SDK as a Cake Addin
#addin nuget:?package=Expo.Server.SDK&version=1.0.0
// Install Expo.Server.SDK as a Cake Tool
#tool nuget:?package=Expo.Server.SDK&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
expo-server-sdk-dotnet
Server-side library for working with Expo using dot-net.
If you have problems with the code in this repository, please file an issue.
Usage
using expo_server_sdk_dotnet.Client;
using expo_server_sdk_dotnet.Models;
using System;
using System.Collections.Generic;
using System.Linq;
var expoSDKClient = new PushApiClient();
var pushTicketReq = new PushTicketRequest() {
PushTo = new List<string>() { "..." },
PushBadgeCount = 7,
PushBody = "Test Push - Msg"
};
var result = expoSDKClient.PushSendAsync(pushTicketReq).GetAwaiter().GetResult();
if (result?.PushTicketErrors?.Count() > 0) {
foreach (var error in result.PushTicketErrors) {
Console.WriteLine($"Error: {error.ErrorCode} - {error.ErrorMessage}");
}
}
//If no errors, then wait for a few moments for the notifications to be delivered
//Then request receipts for each push ticket
...
// Later, after the Expo push notification service has delivered the
// notifications to Apple or Google (usually quickly, but allow the the service
// up to 30 minutes when under load), a "receipt" for each notification is
// created. The receipts will be available for at least a day; stale receipts
// are deleted.
//
// The ID of each receipt is sent back in the response "ticket" for each
// notification. In summary, sending a notification produces a ticket, which
// contains a receipt ID you later use to get the receipt.
//
// The receipts may contain error codes to which you must respond. In
// particular, Apple or Google may block apps that continue to send
// notifications to devices that have blocked notifications or have uninstalled
// your app. Expo does not control this policy and sends back the feedback from
// Apple and Google so you can handle it appropriately.
var pushReceiptResult = expoSDKClient.PushGetReceiptsAsync(pushReceiptReq).GetAwaiter().GetResult();
if (pushReceiptResult?.ErrorInformations?.Count() > 0) {
foreach (var error in result.ErrorInformations) {
Console.WriteLine($"Error: {error.ErrorCode} - {error.ErrorMessage}");
}
}
foreach (var pushReceipt in pushReceiptResult.PushTicketReceipts) {
Console.WriteLine($"TicketId & Delivery Status: {pushReceipt.Key} {pushReceipt.Value.DeliveryStatus} {pushReceipt.Value.DeliveryMessage}");
}
## Developing
The source code is in the `src/` directory.
To build, use the .sln and msbuild
## TODO
* Need to add unit tests
## See Also
* https://github.com/expo/expo-server-sdk-node
* https://github.com/expo/expo-server-sdk-ruby
* https://github.com/expo/expo-server-sdk-python
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.2 is compatible. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 2.2
- Newtonsoft.Json (>= 12.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Expo.Server.SDK:
Package | Downloads |
---|---|
VO.Core
VO core models and services |
GitHub repositories
This package is not used by any popular GitHub repositories.
validated implementation