Kebechet.Maui.RevenueCat.iOS
5.83.1
Prefix Reserved
dotnet add package Kebechet.Maui.RevenueCat.iOS --version 5.83.1
NuGet\Install-Package Kebechet.Maui.RevenueCat.iOS -Version 5.83.1
<PackageReference Include="Kebechet.Maui.RevenueCat.iOS" Version="5.83.1" />
<PackageVersion Include="Kebechet.Maui.RevenueCat.iOS" Version="5.83.1" />
<PackageReference Include="Kebechet.Maui.RevenueCat.iOS" />
paket add Kebechet.Maui.RevenueCat.iOS --version 5.83.1
#r "nuget: Kebechet.Maui.RevenueCat.iOS, 5.83.1"
#:package Kebechet.Maui.RevenueCat.iOS@5.83.1
#addin nuget:?package=Kebechet.Maui.RevenueCat.iOS&version=5.83.1
#tool nuget:?package=Kebechet.Maui.RevenueCat.iOS&version=5.83.1
Maui.RevenueCat.iOS
- this binding is based on: https://github.com/thisisthekap/Xamarin.RevenueCat.iOS
- it is created for .NET MAUI
- it contains bindings for RevenueCat iOS plugin
Versioning Scheme
The versioning scheme of Maui.RevenueCat.iOS is derived from the versioning of revenuecat/purchases-ios.
Example:
| revenuecat/purchases-ios | Maui.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
The canonical way to regenerate this binding is the .github/workflows/generate-ios-bindings.yml workflow (manual dispatch), not the manual steps below. The workflow builds RevenueCat.xcframework from source with the BYPASS_SIMULATED_STORE_RELEASE_CHECK flag so Test Store (test_…) keys work on iOS — see Test Store API key support and #116. The manual steps in this section download the pre-built RevenueCat.xcframework.zip instead, which is always Release-configured and does NOT include that bypass — following them would reintroduce the force-close on Test Store keys. They are kept for historical context and to explain the cleanups the workflow's post-processor automates.
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
IntPtr→NativeReferenceinApiDefinitions- 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:
Generating binding files
- On my MAC I have downloaded and installed Objective Sharpie
- I have downloaded RevenueCat.xcframework.zip of
purchases-ios v4.19.0 - Extract inner
RevenueCat.xcframework/ios-arm64folder on MAC desktop. - started terminal, then
cd ~/Desktop - firstly check what versions of xcode SDKs you have installed by
sharpie xcode -sdksand use theiphoneosXX.Yversion you have - I used command
sharpie bind -framework ios-arm64/RevenueCat.framework -sdk iphoneos18.4 -scope ios-arm64/RevenueCat.framework/Headers- this command generated
ApiDefinitions.csandStructsAndEnums.csfiles - in case it did not and gives you error:
RevenueCat: framework requires SDK 'iphoneosXX.Y' which is not installed. You may need a newer Xcode.In my case it wasiphoneos16.4- if you have older Xcode then update it
- if you have newest Xcode then you need to install older iOS SDKs
- go to Apple developer web and download Xcode that contains that SDK. In my case
Xcode 14.3.1containsiphoneos16.4 - after the download extract
.xipfile and after extraction right click on extracted Xcode file andShow Package Contents - then navigate there into
Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKsand copyiPhoneOsXX.Y.sdk(if it is just link/alias then copy theiPhoneOs.sdkand rename it toiPhoneOsXX.Y.sdkin my caseiPhoneOS16.4.sdk) - then go to location of your original Xcode →
Show Package Contents→ navigate again to:Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKsand paste the copiediPhoneOSXX.Y.sdkthere - restart Xcode
- to verify you did everything correctly run in terminal:
sharpie xcode -sdksand the new SDK you copied should be now there as well - then run the
sharpiecommand to generateApiDefinitions.csandStructsAndEnums.csfiles again
- go to Apple developer web and download Xcode that contains that SDK. In my case
- this command generated
Test Store API key support (BYPASS_SIMULATED_STORE_RELEASE_CHECK)
- The pre-built
RevenueCat.xcframework.ziprelease asset published byRevenueCat/purchases-iosis always Release-configured. ItsSources/Purchasing/Configuration.swiftcontains the guard#if !DEBUG && !BYPASS_SIMULATED_STORE_RELEASE_CHECKwhich callscheckForSimulatedStoreAPIKeyInRelease(...)and force-closes any consumer app initialised with a Test Store API key (test_…) — even in DEBUG, because the framework itself was built Release. - To make Test Store keys usable for development without an App Store setup, the bundled
nativelib/RevenueCat.xcframeworkis built from source by.github/workflows/generate-ios-bindings.ymlwith theBYPASS_SIMULATED_STORE_RELEASE_CHECKSwift compilation flag set viaLocal.xcconfig:SWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited) BYPASS_SIMULATED_STORE_RELEASE_CHECK - This mirrors the approach used by
RevenueCat/purchases-kmpin itskn-core/build.gradle.kts(swiftSettings { define("BYPASS_SIMULATED_STORE_RELEASE_CHECK") }). Global.xcconfigat thepurchases-iosrepo root does#include? "Local.xcconfig"and is read byRevenueCat.xcodeproj, so writingLocal.xcconfigis enough for the flag to reach the build.- The workflow verifies the bypass is active by asserting
BYPASS_SIMULATED_STORE_RELEASE_CHECKis present in the RevenueCat target's resolvedSWIFT_ACTIVE_COMPILATION_CONDITIONS(xcodebuild -showBuildSettings) before building — a direct, positive check rather than relying on the absence of an internal symbol that may never be externally visible regardless of the flag. - See issue #116 for context.
Adjusting generated files
- then I placed new framework file into repo
- firstly commented but later completely removed
Verifyattributes - commit - then removed all device-specific attributes - commit
- TIP: You can find all attributes by searching for
iOS (. Because all of them contain this string - at the same time commented out
(AutoGeneratedName = true)
- TIP: You can find all attributes by searching for
- added namespaces - commit
- comment out text that was not commented out - commit
- then I merged interfaces with the same names e.g.
RCAttributionandRCAttribution_RevenueCat_Swift_3714I put together - commit- I have also removed obsolete & deprecated interfaces/methods
- removed default using there were useless - commit
- removed constants interface - commit
- because I didnt know how to bind
byte[]😅 - (optional) If you would like to bind the
RevenueCatVersionNumberuse this for interface name:[BaseType(typeof(NSObject))] [DisableDefaultCtor] interface RCConstantsand above the variable put[Static]attribute
- because I didnt know how to bind
- removed interfaces without methods/properties - commit
- remove Protocols that were used for inheritance - commit
- removed delegate that was not used anywhere - commit
- added
INativeObjectinheritance for interfaces that were used in dictionaries and was of typeNSObject- commit- error example:
cannot be used as type parameter 'TValue' in the generic type or method 'NSDictionary<TKey, TValue>'
- error example:
- replaced
NSUrlRequestforNSMutableUrlRequest- commit - created delegates for Purchases - commit
- when delegates are not replaced then error
Trampolines.g.cs(433,25,433,26): error CS1026: ) expected
- when delegates are not replaced then error
- removed inherited
NSObjectmethods - commitisEqualandDescription- also removed
DebugDescription- commit
- removed inherited
NSOperationmethods - 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
- From
[Obsoleted]remove all new line characters\n - from
.xcframeworkremove all*.swiftmoduledirectories - ✅ - Done
- I have tested this new binding in the simulator as well as on real device through TestFlight and it works as expected
Additional fix:
- if you experience build error:
lang++ exited with code 1: error : Undefined symbols for architecture arm64- I experienced this problem while debugging on Remote device (iphone connected directly to MAC and that MAC connected to Windows)
"_OBJC_CLASS_$_FakeASIdManager", referenced from:
objc-class-ref in registrar.o
"_OBJC_CLASS_$_FakeAfficheClient", referenced from:
objc-class-ref in registrar.o
"_OBJC_CLASS_$_FakeTrackingManager", referenced from:
objc-class-ref in registrar.o
"_OBJC_CLASS_$_NetworkOperation", referenced from:
objc-class-ref in registrar.o
"_OBJC_CLASS_$_PaymentQueueWrapper", referenced from:
objc-class-ref in registrar.o
"_OBJC_CLASS_$_ProductsFetcherSK1", referenced from:
objc-class-ref in registrar.o
"_OBJC_CLASS_$_PurchasesReceiptParser", referenced from:
objc-class-ref in registrar.o
"_OBJC_CLASS_$_StoreKit1Wrapper", referenced from:
objc-class-ref in registrar.o
"_OBJC_CLASS_$_StoreKitRequestFetcher", referenced from:
objc-class-ref in registrar.o
"_OBJC_CLASS_$_TrackingManagerProxy", referenced from:
objc-class-ref in registrar.o
- then remove those types e.g.
FakeASIdManagerfromApiDefinitions.csfile - commit
Xcode
- When latest Xcode version is out it doesn't mean MAUI/Xamarin can immediately it.
- You can find here what Xcode is currently supported. Even though Xcode version is on the list make sure to check open github issues in the xamarin-macios repo
- In case you want to upgrade/downgrade to specific Xcode version then:
- uninstall your current version
- download version you want: https://developer.apple.com/download/all/
- extract
.xipfile and move it's content to/Applicationsfolder - after extraction open Xcode and it will ask you to install additional components (e.g. iOS) so install it
- In case you get error
The connection cannot continue because the remote iOS SDK was not found or is corrupted.- go to your MAC and in terminal do:
rm -rf ~/Library/Caches/Xamarin/XMA/SDKs/dotnet/
- go to your MAC and in terminal do:
⚠️Warning
- in
.NET 7and withVS2022v17.7IT 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
- in
VS2022v17.8.4with latestMAUIit works correctly
License
This repository is licensed with the MIT license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0-ios18.0 is compatible. net9.0-maccatalyst18.0 is compatible. net10.0-ios was computed. net10.0-maccatalyst was computed. |
-
net9.0-ios18.0
- No dependencies.
-
net9.0-maccatalyst18.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Kebechet.Maui.RevenueCat.iOS:
| Package | Downloads |
|---|---|
|
Kebechet.Maui.RevenueCat.InAppBilling
A unified C# API over the RevenueCat Android, iOS and Mac Catalyst SDKs, so you write no platform-specific purchase code. Covers subscriptions, one-time purchases, entitlements, restore, login/logout and subscriber attributes, with a Windows stub for development. RevenueCat Test Store keys (test_...) also work in iOS Release builds - the shipped xcframework is built from source with BYPASS_SIMULATED_STORE_RELEASE_CHECK instead of using the prebuilt framework, which would force-close the app. 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.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.83.1 | 242 | 8/6/2026 |
| 5.72.0.3 | 113 | 8/5/2026 |
| 5.72.0.2 | 102 | 8/5/2026 |
| 5.72.0.1 | 1,365 | 5/12/2026 |
| 5.72.0 | 123 | 5/12/2026 |
| 5.34.0.1 | 2,940 | 8/18/2025 |
| 5.34.0 | 265 | 8/11/2025 |
| 4.31.9.6 | 1,501 | 1/11/2025 |
| 4.31.9.6-preview4 | 179 | 1/11/2025 |
| 4.31.9.6-preview3 | 167 | 1/11/2025 |
| 4.31.9.6-preview2 | 162 | 1/11/2025 |
| 4.31.9.6-preview1 | 174 | 1/11/2025 |
| 4.31.9.5 | 212 | 1/11/2025 |
| 4.31.9.4 | 218 | 1/11/2025 |
| 4.31.9.3 | 2,220 | 9/30/2024 |
| 4.31.9.2 | 298 | 8/7/2024 |
| 4.31.9.1 | 2,703 | 1/18/2024 |
| 4.31.9.1-preview1 | 186 | 1/18/2024 |
| 4.31.9 | 266 | 1/17/2024 |
| 4.31.9-preview31 | 199 | 1/17/2024 |
5.83.1.0: RevenueCat iOS SDK updated from 5.72.0 to 5.83.1. Binding surface gains RCBillingPlanType and RCInstallmentsInfo (Billing Plans support) and RCRevocationReason (revocationDate/revocationReason on StoreTransaction); nothing was removed. Notable upstream fixes: Test Store free-trial support, Test Store no longer logs misleading App Store/StoreKit messages, and a T-SAN memory-alignment crash under Xcode 27. Full changelog: https://github.com/RevenueCat/purchases-ios/releases. The xcframework is still built from source with BYPASS_SIMULATED_STORE_RELEASE_CHECK across all three slices. 5.72.0.3: add net9.0-maccatalyst target with a Mac Catalyst slice in the xcframework, built from source with the same BYPASS_SIMULATED_STORE_RELEASE_CHECK flag so Test Store test_ API keys work in Release on Catalyst too. 5.72.0.2: RevenueCat Test Store API keys (test_…) no longer force-close consumer apps in Release builds (issue #116); xcframework built from source via .github/workflows/generate-ios-bindings.yml with the BYPASS_SIMULATED_STORE_RELEASE_CHECK Swift compilation flag, mirroring RevenueCat/purchases-kmp. 5.72.0.1: link-time crash from unexported native classes (StoreKit2PromotionalOfferPurchaseOptions, RedirectLoggerSessionDelegate) and bgen failure from combined platform-availability attributes ([Watch, TV, Mac, iOS]).