1

I have .NET MAUI app where I want to use 3rd party payment processing library RevenueCat. There are 2 Xamarin bindings already for this lib:

The Android one when referenced to .NET MAUI project works correctly, but the iOS one seems not to be supported by MAUI.

So I have decided to port it from original iOS Binding library (Xamarin) to iOS binding library on .NET7.

  • I have copied all binding-related files as well as native .framework folder to the MAUI
  • I have adjusted attributes that werent supported by MAUI e.g. Watch, Mac, iOS or AutoGeneratedName -> commit
  • I have added necessary things to .csproj

and I was able to build it on my connected MAC M1 mini (from Windows).


But the output Nuget package was only a few KBs and the original nuget was ~7MB. After closer look I found out that my MAUI nuget doesnt contain the native .framework resource and I have no idea why.

Do you know what am I missing?

Here is link to the repo of this nuget: https://github.com/Kebechet/Maui.RevenueCat.iOS

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
Kebechet
  • 1,461
  • 15
  • 31
  • Try setting NoBindingEmbedding=false in csproj: https://github.com/dotnet/upgrade-assistant/issues/1052 – o_w May 09 '23 at 08:51
  • @o_w Thnx for recommendation, but it didnt help – Kebechet May 10 '23 at 04:36
  • If you leave the nuget aside, and just build in Release, does the dll generated include the content? – o_w May 10 '23 at 06:24
  • 1
    Actually never mind, I think your problem is your project's dependency of Xamarin.iOS.SwiftRuntimeSupport. I checked it out at: https://github.com/xamarin/XamarinComponents/blob/main/iOS/SwiftRuntimeSupport/source/SwiftRuntimeSupport.csproj And it seems its target framework is Xamarin so it won't work here in Maui – o_w May 10 '23 at 06:29
  • No, this wasnt the problem. I tried to build this directly from MAC and it seems to be correctly built with final binary not having 31KB but 7MB. So it seems to be Windows env. problem (even though I was doing the build remotely on MAC). – Kebechet May 10 '23 at 06:46
  • If you build remotely make sure the xcode installed on the remote mac is of a version that supports your target ios framework – o_w May 10 '23 at 07:04

0 Answers0