Kebechet.Maui.RevenueCat.InAppBilling 5.1.0

Prefix Reserved
dotnet add package Kebechet.Maui.RevenueCat.InAppBilling --version 5.1.0
                    
NuGet\Install-Package Kebechet.Maui.RevenueCat.InAppBilling -Version 5.1.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="Kebechet.Maui.RevenueCat.InAppBilling" Version="5.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Kebechet.Maui.RevenueCat.InAppBilling" Version="5.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Kebechet.Maui.RevenueCat.InAppBilling" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Kebechet.Maui.RevenueCat.InAppBilling --version 5.1.0
                    
#r "nuget: Kebechet.Maui.RevenueCat.InAppBilling, 5.1.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.
#addin nuget:?package=Kebechet.Maui.RevenueCat.InAppBilling&version=5.1.0
                    
Install Kebechet.Maui.RevenueCat.InAppBilling as a Cake Addin
#tool nuget:?package=Kebechet.Maui.RevenueCat.InAppBilling&version=5.1.0
                    
Install Kebechet.Maui.RevenueCat.InAppBilling as a Cake Tool

"Buy Me A Coffee"

Maui.RevenueCat.InAppBilling

NuGet Version NuGet Downloads

This library serves as an abstraction for both platforms and abstracts away the need for you to use platform-specific code from Android and iOS bindings for native RevenueCat libraries.

Credits

Usage

Firstly register package installer in your MauiProgram.cs

 builder.Services.AddRevenueCatBilling();

then in App.xaml.cs inject IRevenueCatBilling:

public partial class App : Application {
    private readonly IRevenueCatBilling _revenueCat;

    public App(IRevenueCatBilling revenueCat) {
        InitializeComponent();
        _revenueCat = revenueCat;
    }
}

and also override there method OnStart() to call _revenueCat.Initialize with your revenueCat apiKey (this key is platform dependant).

protected override void OnStart() {
    var revenueCatApiKey = string.Empty;

#if __ANDROID__
    revenueCatApiKey = "<AndroidRevenueCatKeyHere>";
#elif __IOS__
    revenueCatApiKey = "<iOSRevenueCatKeyHere>";
#endif

    _revenueCat.Initialize(revenueCatApiKey);

    base.OnStart();
}

Dummy classes

So that you dont have to specify platform for this package and it's calls, also Windows and MacCatalyst are added with dummy implementations. When you call one of their methods you will always get:

  • true for bool returns
  • new List<> for collections
  • string.Empty for string values

Example of such dummy class: RevenueCatBillingWindows.cs

Exception behavior

  • Library will throw exceptions only in case developer did some mistake
  • in other cases, when there is some corrupted state it will either return ErrorCode in output variable e.g. PurchaseResult or it will return default value of that type.

Contributions

Feel free to create an issue or pull request. In case you would like to do massive changes in the package please firstly discuss them in the issue because otherwise there is high chance that such big PR would be rejected.

License

This repository is licensed with the MIT license.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-android35.0 is compatible.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-ios18.0 is compatible.  net9.0-maccatalyst was computed.  net9.0-maccatalyst18.0 is compatible.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net9.0-windows10.0.19041 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.1.0 146 3/26/2025
5.0.1 178 3/2/2025
5.0.0 289 2/8/2025
4.5.4 144 12/16/2024
4.5.3 1,467 10/14/2024
4.5.2 319 9/30/2024
4.5.1 114 9/29/2024
4.5.0 177 9/11/2024
4.4.2 719 8/8/2024
4.4.1 166 7/29/2024
4.4.0 280 7/8/2024
4.3.0 874 2/27/2024
4.2.0 129 2/26/2024
4.1.0 150 2/14/2024
4.0.0 321 1/19/2024
4.0.0-preview1 100 1/18/2024
3.0.0 755 10/22/2023
2.1.1 252 10/16/2023
2.1.0 166 10/14/2023
2.0.0 158 10/7/2023
1.1.1 282 9/19/2023
1.1.0 160 9/13/2023
1.0.6 155 8/7/2023
1.0.5 362 8/5/2023
1.0.4 179 7/31/2023
1.0.3 243 7/21/2023
1.0.2 282 5/31/2023
1.0.1 174 5/17/2023
1.0.1-preview4 206 5/17/2023
1.0.1-preview3 132 5/17/2023
1.0.1-preview2 142 5/17/2023
1.0.0 156 5/17/2023
1.0.0-preview3 129 5/12/2023
1.0.0-preview2 140 5/10/2023
1.0.0-preview11 143 5/13/2023
1.0.0-preview1 135 5/8/2023

Added and fixed extension methods