Kebechet.Maui.RevenueCat.Android
9.2.0.2
Prefix Reserved
dotnet add package Kebechet.Maui.RevenueCat.Android --version 9.2.0.2
NuGet\Install-Package Kebechet.Maui.RevenueCat.Android -Version 9.2.0.2
<PackageReference Include="Kebechet.Maui.RevenueCat.Android" Version="9.2.0.2" />
<PackageVersion Include="Kebechet.Maui.RevenueCat.Android" Version="9.2.0.2" />
<PackageReference Include="Kebechet.Maui.RevenueCat.Android" />
paket add Kebechet.Maui.RevenueCat.Android --version 9.2.0.2
#r "nuget: Kebechet.Maui.RevenueCat.Android, 9.2.0.2"
#:package Kebechet.Maui.RevenueCat.Android@9.2.0.2
#addin nuget:?package=Kebechet.Maui.RevenueCat.Android&version=9.2.0.2
#tool nuget:?package=Kebechet.Maui.RevenueCat.Android&version=9.2.0.2
Maui.RevenueCat.Android
- this binding is based on: https://github.com/thisisthekap/Xamarin.RevenueCat.Android
- it is created for .NET MAUI
- it contains bindings for RevenueCat Android library
Versioning Scheme
The versioning scheme of Maui.RevenueCat.Android is derived from the versioning of revenuecat/purchases-android.
Example:
| revenuecat/purchases-android | Maui.RevenueCat.Android | Note |
|---|---|---|
| 3.4.1 | 3.4.1.0 | First version of bindings for 3.4.1 |
| 3.4.1 | 3.4.1.17 | Bindings for 3.4.1 containing 17 fixes |
How the binding was created
RevenueCat Android library is writtein in Kotlin. You can find more about Kotlin binding here.
- To start create a project
Android Java library binding - Then files of the the library have to be downloaded.
- For native libraries you can use Google maven repo.
- For downloading this library I have used mvnrepository.com to download the RevenueCat v7.2.4 android library.
- At the time of creating this binding
v7.3.3was out but it wasn't compatible with latestXamarin.Android.Google.BillingClientlibrary
- Click files->View all: You have to download there files:
.aarthat contains the compiled library and-sources.jarthat is used in binding process for documenting the library.
- After download create in your project
Jarsfolder and put there both files. For- for
.aarsetBuild Actionto:AndroidLibrary - for
-sources.jarsetBuild Actionto:JavaSourceJarbased on this docs
- for
- Then you have to add all necessary dependencies. Dependencies of the library are showed on mvnrepository site. Your binding library should contain all these dependencies (ideally in same
versionbut until those libraries are compatible, versions are not important).- I have found and added
PackageReferencefor allXamarin/Mauialternatives of these libraries - ⚠️ When I wanted to use newer RevenueCat
v7.3.3with requirement ofBillingClient v6.1.0while the newest Xamarin library was stuck atv6.0.1it caused build errors after inserting this project to the main MAUI app. Rule of thumb is that usually libraries are back compatible but not forward compatible. So when it requires newer version it could be a problem but when you have newer version of the package it could be okay(depends if some breaking changes were introduced).
- I have found and added
- ⚠️ Even after finding all mentioned libraries I had some warnings regarding some
amazonmethod calls and build errorandroidx.collection.ArrayMapKt is defined multiple times- the amazon problem was fixed by including package
Eddys.Amazon.AppStoreSdk.Binding - and the compilation error by including
Xamarin.AndroidX.Fragment.Ktx.- I found this in the source: purchases-android-main\purchases-android-main\api-tester\build.gradle at the end and it is present also in gradle\libs.versions.toml
- the amazon problem was fixed by including package
- After providing all necessary libraries you have to adjust
Metadata.xmlto get rid of compilation errors. - docs - ⚠️ At the end there are still 2 important warnings left with
kotlin.jvm.functions.Function1andkotlin.jvm.internal.IntCompanionObjectbut even with them the binding works correctly - to build the nuget package run:
dotnet pack .\Maui.RevenueCat.Android.csproj -c Release - I hope this helped and enjoy the binding ❤️
License
This repository is licensed with the MIT license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0-android35.0 is compatible. net10.0-android was computed. |
-
net9.0-android35.0
- Dev.Drewhamilton.Poko.PokoAnnotations (>= 0.17.2.3)
- Eddys.Amazon.AppStoreSdk.Binding (>= 3.0.3)
- Xamarin.Android.Google.BillingClient (>= 8.0.0)
- Xamarin.AndroidX.Annotation (>= 1.9.1.4)
- Xamarin.AndroidX.Core.Core.Ktx (>= 1.16.0.2)
- Xamarin.AndroidX.Fragment.Ktx (>= 1.8.8)
- Xamarin.AndroidX.Lifecycle.Common (>= 2.9.1)
- Xamarin.AndroidX.Lifecycle.LiveData.Core (>= 2.9.1)
- Xamarin.AndroidX.Lifecycle.LiveData.Core.Ktx (>= 2.9.1)
- Xamarin.AndroidX.Lifecycle.Process (>= 2.9.1)
- Xamarin.AndroidX.Lifecycle.Runtime (>= 2.9.1)
- Xamarin.AndroidX.Lifecycle.Runtime.Ktx (>= 2.9.1)
- Xamarin.AndroidX.Lifecycle.Runtime.Ktx.Android (>= 2.9.1)
- Xamarin.AndroidX.SavedState (>= 1.3.0.1)
- Xamarin.Google.Crypto.Tink.Android (>= 1.15.0.1)
- Xamarin.GooglePlayServices.Ads.Identifier (>= 118.1.0.3)
- Xamarin.Kotlin.Parcelize.Runtime (>= 2.0.21.4)
- Xamarin.Kotlin.StdLib (>= 2.2.0)
- Xamarin.KotlinX.Serialization.Json (>= 1.7.3.5)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Kebechet.Maui.RevenueCat.Android:
| Package | Downloads |
|---|---|
|
Kebechet.Maui.RevenueCat.InAppBilling
Serves as an abstraction around RevenueCat Android and iOS SDKs https://docs.revenuecat.com/docs |
|
|
MZikmund.Uno.RevenueCat
Serves as an abstraction around RevenueCat Android and iOS SDKs for Uno Platform https://docs.revenuecat.com/docs |
GitHub repositories
This package is not used by any popular GitHub repositories.
Potential fix for project unloading