-
Notifications
You must be signed in to change notification settings - Fork 520
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
.Net9 causing Could not find the type 'ObjCRuntime.__Registrar__ #22071
Comments
Issue moved from dotnet/maui#27312
From @Ying-6 on Friday, January 24, 2025 9:09:39 AM Could you provide a simple reproduction project for us to investigate it further? Looking forward to your reply! |
Issue moved from dotnet/maui#27312
From @natevarghese on Saturday, January 25, 2025 10:10:52 AM Please use this as a test repo. It has the objc bindings already so it's quite large but not a lot of code is required to reproduce it. As a reminder it only crashes on physical iOS devices, so you will need to update the bundle identifier to one you have provisioned. |
Hi, moving the issue here. Let me know if this one should be in the Maui Issues! |
Any update on this? Please do not archive it for inactivity |
@Ying-6 Any updates? |
Can you get an MSBuild binlog from the build of the main project (app project) with this workaround applied? |
I generated msbuild.binlog using the following command: The file has been added to the repository |
This is probably a dup of #21891, which has already been fixed (and the fix was released a couple of weeks ago - https://github.com/xamarin/xamarin-macios/releases/tag/dotnet-9.0.1xx-xcode16.2-9173) Can you try removing the workaround, updating to the latest version of the iOS workload, and then try again to see if that works? |
Yes, updating to the latest workload solved it. Thanks! |
Issue moved from dotnet/maui#27312
From @natevarghese on Thursday, January 23, 2025 6:18:01 PM
Description
After updating all my projects to .NET 9, I encountered the following error when trying to access a custom Objective-C binding library, which is referenced by the iOS project. The issue only occurs on a physical iOS device:
Error:
Could not find the type 'ObjCRuntime.Registrar' in the assembly.
Following suggestions, I added the recommended configuration to one or more of the referenced projects, as described in the release notes:
Source: Xamarin .NET 9 Release Notes - Type Registrar
After making this change, the app crashes immediately on startup, preventing me from obtaining a stack trace. I'm unsure how to proceed. I’ve added the snippet to the iOS project, the binding library project(s), and every possible combination of them, but the issue persists.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
9.0.0 GA
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
8.0.3 GA
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
No workarounds known
Relevant log output
The text was updated successfully, but these errors were encountered: