-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS binding returns NULL on .NET8 #19856
Comments
After some trial and error I was able to make the library work but only with remote device (iPhone connected with cable to MAC into which I am connected remotely from Windows - my main machine). |
The
which is because it seems the symbol is a mangled symbol:
(this means the native class name is actually Also I recommend using the .xcframework shipped by RevenueCat instead of the .framework (this is required to support the simulator on ARM64 macOS machines). There's bit more info here: https://github.com/xamarin/xamarin-macios/wiki/.NET-8-release-notes#default-runtimeidentifiers |
Thank you for the tip on |
Hello @rolfbjarne , I am experiencing a similar issue when consuming a binding library from a .NET 8 application. In my case I noticed that I too have a repro project here: https://github.com/akravch/IosNet8Binding In this sample I bind to a PLCrashReporter static library (https://github.com/microsoft/plcrashreporter/releases/tag/1.11.1), but the behaviour seems to be the same regardless of the library. This sample is supposed to render Switching to |
@akravch please create a new issue so that we don't end up confusing potentially two different problems |
Steps to Reproduce
main
branch. It contains.NET7
version of the bindingKebechet.Maui.RevenueCat.iOS
. In App.xaml.cs L17 put breakpoint and run it on your iPhone. When it reach the breakpointresult
should be filled with some value._net8
. This branch has changed versions of the framework to.NET8
+ binding with version4.31.9-preview1
what is the same binding but with changed version of .NET. Ofc before running this remove bin & obj, restore packages and run. In this case when breakpoint is triggered theresult
contains NULL.Expected Behavior
.NET8 version should return object as .NET7 one
Actual Behavior
Null is returned from the method
Purchases.ConfigureWithAPIKey
Environment
Version information
Build Logs
msbuild.zip
Example Project (If Possible)
Testing project: https://github.com/Kebechet/BugBinding
main
- containing working .NET7 test project where inApp.xaml.cs
callPurchases.ConfigureWithAPIKey
returns some value_net8
- .NET8 proejct where the call returns NULLBinding project: https://github.com/Kebechet/Maui.RevenueCat.iOS
main
branch containing working .NET7 binding andNET8
branch which is released in nuget as4.31.9.1-preview1
and has only changed framework version from NET7 to NET8The text was updated successfully, but these errors were encountered: