SyntaxCircus.RevenueCat.Maui
0.1.1
See the version list below for details.
dotnet add package SyntaxCircus.RevenueCat.Maui --version 0.1.1
NuGet\Install-Package SyntaxCircus.RevenueCat.Maui -Version 0.1.1
<PackageReference Include="SyntaxCircus.RevenueCat.Maui" Version="0.1.1" />
<PackageVersion Include="SyntaxCircus.RevenueCat.Maui" Version="0.1.1" />
<PackageReference Include="SyntaxCircus.RevenueCat.Maui" />
paket add SyntaxCircus.RevenueCat.Maui --version 0.1.1
#r "nuget: SyntaxCircus.RevenueCat.Maui, 0.1.1"
#:package SyntaxCircus.RevenueCat.Maui@0.1.1
#addin nuget:?package=SyntaxCircus.RevenueCat.Maui&version=0.1.1
#tool nuget:?package=SyntaxCircus.RevenueCat.Maui&version=0.1.1
SyntaxCircus.RevenueCat.Maui
Client-side RevenueCat helpers for MAUI apps, built on top of Kebechet.Maui.RevenueCat.InAppBilling (the vendor SDK binding — not reimplemented here). Covers SDK initialization, identity sync on login, offering-to-DTO mapping, and a purchase/restore orchestrator.
For backend-side RevenueCat integration (webhook verification, REST clients), see SyntaxCircus.RevenueCat.
No support guaranteed. Published as-is and maintained on a best-effort basis. Issues and PRs are welcome, but there's no SLA — fork it or vendor what you need if that's not enough.
Targets
net10.0-android and net10.0-ios only, matching the vendor SDK's proven real-world coverage. Add maccatalyst/windows yourself if you've verified Kebechet.Maui.RevenueCat.InAppBilling supports them for your use case.
Setup
// MauiProgram.cs
builder.Services.AddRevenueCatMaui(builder.Configuration); // binds "RevenueCat", registers IRevenueCatBilling
{
"RevenueCat": {
"AndroidApiKey": "goog_...",
"IosApiKey": "appl_..."
}
}
// App.xaml.cs — initialize once, early in the app lifecycle
protected override void OnStart()
{
RevenueCatInitializer.TryInitialize(_billing, _options.Value);
base.OnStart();
}
These are the public (publishable) per-platform keys from the RevenueCat dashboard — safe to ship inside the app binary, distinct from the server-side secret key SyntaxCircus.RevenueCat uses.
Identity sync
Point RevenueCat's app_user_id at your own user id as soon as you know it (e.g. after login), so purchases and the TRANSFER webhook event correctly re-associate across reinstalls and new devices:
await RevenueCatIdentitySync.SyncLoginAsync(billing, userId, logger, ct);
Failures are logged and swallowed — this is best-effort, not something worth failing app startup over.
Products
IReadOnlyList<RevenueCatProduct> products =
await RevenueCatOfferingsMapper.GetCurrentProductsAsync(billing, ct: ct);
Purchases and restore
RevenueCatPurchaseResult result =
await RevenueCatPurchaseOrchestrator.PurchaseAsync(billing, productIdentifier, logger, ct);
if (result.Success)
{
// record result.TransactionId / result.AppUserId against your own backend here
}
else if (result.WasCancelled)
{
// user-initiated cancellation, not an error
}
RevenueCatPurchaseResult restoreResult =
await RevenueCatPurchaseOrchestrator.RestoreAsync(billing, userId, logger, ct);
PurchaseAsync and RestoreAsync only own the store interaction — recording a successful purchase against your own backend (subscriber verification, entitlement grants, etc.) is deliberately left to the caller, the same split SyntaxCircus.RevenueCat's webhook reader uses on the backend side.
Contributing
Issues and pull requests are welcome:
- Keep changes focused, with a clear description of the behavior change.
- Match the existing code style (see
.editorconfig). - Call out any breaking changes to the public API in your PR description.
License
MIT — see LICENSE.txt.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-android36.0 is compatible. net10.0-browser was computed. net10.0-ios was computed. net10.0-ios26.0 is compatible. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Kebechet.Maui.RevenueCat.InAppBilling (>= 7.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.0)
- SharpCompress (>= 0.48.1)
-
net10.0-android36.0
- Kebechet.Maui.RevenueCat.InAppBilling (>= 7.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.0)
- SharpCompress (>= 0.48.1)
- Xamarin.AndroidX.Lifecycle.LiveData (>= 2.10.0.2)
- Xamarin.AndroidX.Lifecycle.LiveData.Core (>= 2.10.0.2)
- Xamarin.AndroidX.Lifecycle.LiveData.Core.Ktx (>= 2.10.0.2)
-
net10.0-ios26.0
- Kebechet.Maui.RevenueCat.InAppBilling (>= 7.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.0)
- SharpCompress (>= 0.48.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.