Skip to content

Kebechet/Maui.RevenueCat.Android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

"Buy Me A Coffee"

Maui.RevenueCat.Android

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.3 was out but it wasn't compatible with latest Xamarin.Android.Google.BillingClient library
  • Click files->View all: You have to download there files:
    • .aar that contains the compiled library and
    • -sources.jar that is used in binding process for documenting the library.
  • After download create in your project Jars folder and put there both files. For
    • for .aar set Build Action to: AndroidLibrary
    • for -sources.jar set Build Action to: JavaSourceJar based on this docs
  • 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 version but until those libraries are compatible, versions are not important).
    • I have found and added PackageReference for all Xamarin/Maui alternatives of these libraries
    • ⚠️ When I wanted to use newer RevenueCat v7.3.3 with requirement of BillingClient v6.1.0 while the newest Xamarin library was stuck at v6.0.1 it 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).
  • ⚠️ Even after finding all mentioned libraries I had some warnings regarding some amazon method calls and build error androidx.collection.ArrayMapKt is defined multiple times
  • After providing all necessary libraries you have to adjust Metadata.xml to get rid of compilation errors. - docs
  • ⚠️ At the end there are still 2 important warnings left with kotlin.jvm.functions.Function1 and kotlin.jvm.internal.IntCompanionObject but even with then the binding works correctly
  • I hope this helped and enjoy the binding ❤️

License

This repository is licensed with the MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published