Kebechet.Maui.RevenueCat.iOS 4.19.0.3

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Kebechet.Maui.RevenueCat.iOS --version 4.19.0.3                
NuGet\Install-Package Kebechet.Maui.RevenueCat.iOS -Version 4.19.0.3                
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.iOS" Version="4.19.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Kebechet.Maui.RevenueCat.iOS --version 4.19.0.3                
#r "nuget: Kebechet.Maui.RevenueCat.iOS, 4.19.0.3"                
#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 Kebechet.Maui.RevenueCat.iOS as a Cake Addin
#addin nuget:?package=Kebechet.Maui.RevenueCat.iOS&version=4.19.0.3

// Install Kebechet.Maui.RevenueCat.iOS as a Cake Tool
#tool nuget:?package=Kebechet.Maui.RevenueCat.iOS&version=4.19.0.3                

Maui.RevenueCat.iOS

Versioning Scheme

The versioning scheme of Maui.RevenueCat.iOS is derived from the versioning of revenuecat/purchases-ios.

Example:

revenuecat/purchases-ios Xamarin.RevenueCat.iOS 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 fixes

Binding creation

Porting old xamarin library ios to .NET MAUI

First version of our Maui binding was just changed Xamarin.RevenueCat.iOS binding working for .NET MAUI. It was binding around RevenueCat ios 4.9.0, but this native library contained bitcode which is no longer accepted by AppStore. Porting of binding from Xamarin to Maui required several changes:

  • Removed some attributes in ApiDefinitions - commit
  • Changed IntPtrNativeReference in ApiDefinitions - commit
  • Added NoBindingEmbedding = false - commit

Creating completely new binding consisted of these steps:

Because of a problem with bitcode I have decided to create completely new binding from scratch. Here are steps I have done:

  • On my MAC I have downloaded and installed Objective Sharpie
  • I have downloaded RevenueCat purchases-ios v4.19.0
  • I have extracted the iOS folder on my MAC desktop
  • started terminal, then cd ~/Desktop
  • I used command sharpie bind -framework iOS/RevenueCat.framework -sdk iphoneos16.4 -scope iOS/RevenueCat.framework/Headers
    • this command generated ApiDefinitions.cs and StructsAndEnums.cs files
  • then I placed new framework file into repo
  • firstly commented but later completely removed Verify attributes - commit
  • then removed all device-specific attributes - commit
  • added namespaces - commit
  • comment out text that was not commented out - commit
  • then I merged interfaces with the same names e.g. RCAttribution and RCAttribution_RevenueCat_Swift_3714 I put together - commit
    • I have also removed obsolete interfaces/methods
  • removed default using there were useless - commit
  • removed constants interface - commit
    • because I didnt know how to bind byte[] 😅
  • removed interfaces without methods/properties - commit
  • remove Protocols that were used for inheritance - commit
  • removed delegate that was not used anywhere - commit
  • added INativeObject inheritance for interfaces that were used in dictionaries and was of type NSObject - commit
  • replaced NSUrlRequest for NSMutableUrlRequest - commit
  • created delegates for Purchases - commit
  • removed inherited NSObject methods - commit
    • also removed DebugDescription - commit
  • removed inherited NSOperation methods - commit
  • I have created aliases for methods named the same - commit
    • ⚠️ I dont know if this is correct or even necessary, maybe I could delete them as well
  • removed attributes containing Name - commit
    • this was because on my windows machine I was getting errors that platform doesnt have symbols specified for this methods containing the name
    • later I completely removed those methods because the error was still there - commit
  • ✅ - Done
    • I have tested this new binding in the simulator as well as on real device through TestFlight and it works as expected

⚠️Warning

  • in .NET 7 and with VS2022 IT IS NOT POSSIBLE TO BUILD THE PACKAGE WITH EMBEDDED NATIVE LIBRARY (even with connected MAC).
  • You need to build this package on MAC with VS for MAC. Only that way it will link native library to the package.
  • https://github.com/dotnet/maui/issues/14982

License

This repository is licensed with the MIT license.

Product Compatible and additional computed target framework versions.
.NET net7.0-ios16.1 is compatible.  net8.0-ios was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0-ios16.1

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Kebechet.Maui.RevenueCat.iOS:

Package Downloads
Kebechet.Maui.RevenueCat.InAppBilling

Serves as an abstraction around RevenueCat Android and iOS SDKs https://docs.revenuecat.com/docs

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.31.9.3 491 9/30/2024
4.31.9.2 142 8/7/2024
4.31.9.1 1,944 1/18/2024
4.31.9.1-preview1 88 1/18/2024
4.31.9 111 1/17/2024
4.31.9-preview31 89 1/17/2024
4.31.9-preview30 89 1/17/2024
4.31.9-preview23 92 1/17/2024
4.31.9-preview22 94 1/17/2024
4.31.9-preview21 92 1/17/2024
4.31.9-preview1 95 1/17/2024
4.19.0.3 165 7/31/2023
4.19.0.2 135 7/31/2023
4.19.0.1 160 7/31/2023
4.19.0 1,074 7/21/2023
4.19.0-preview3 311 5/17/2023
4.19.0-preview2 130 5/17/2023
4.19.0-preview1 137 5/17/2023
4.9.0.2-fix8 174 5/17/2023
4.9.0.2-fix7 168 5/10/2023
4.9.0.2-fix5 122 5/7/2023
4.9.0.2-fix4 135 5/7/2023
4.9.0.2-fix3 127 5/7/2023
4.9.0.2-fix1 141 5/7/2023
4.9.0.2-fix0 130 5/6/2023

Fixed version