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

6
  • Try setting NoBindingEmbedding=false in csproj: github.com/dotnet/upgrade-assistant/issues/1052 Commented May 9, 2023 at 8:51
  • @o_w Thnx for recommendation, but it didnt help 😢 Commented May 10, 2023 at 4:36
  • If you leave the nuget aside, and just build in Release, does the dll generated include the content? Commented May 10, 2023 at 6:24
  • 1
    Actually never mind, I think your problem is your project's dependency of Xamarin.iOS.SwiftRuntimeSupport. I checked it out at: github.com/xamarin/XamarinComponents/blob/main/iOS/… And it seems its target framework is Xamarin so it won't work here in Maui Commented May 10, 2023 at 6: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). Commented May 10, 2023 at 6:46

1 Answer 1

0

The main problem was .NET7 with VS v17.7. With that combination it wasn't possible to release binding package with embedded native library from Windows.

Workaround for that was to build it in VS for MAC on my MAC mini.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.