-
Notifications
You must be signed in to change notification settings - Fork 517
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
The 'isWrapper' argument to the [Register] attribute must be correct for models #4065
Comments
Closing since this issue is purely informational. |
Is this issue still present ?? |
@volcano619 if you run into this you need to fix the binding library that causes this problem, it's not something that will be fixed in Xamarin.iOS. |
The library is present ,has all the architectures and has the interfaces that it claims to be missing, tried adding [Protocol] annotation but that just seems to bypass the error |
@volcano619 if have the binding project and are building it, you're not running into this problem (which only happens if you're using an already built binding assembly that hasn't been rebuilt since 2015). I suggest you file a new issue and describe your problem there, preferably attaching the binding project as well. |
This is a breaking change in d15-7 that exposes an old bug in our binding generator, causing build failures (this is an example of the CorePlot component, which hasn't been updated since early 2015):
Old versions of the binding generator would generate the following code:
The problem is the
true
argument to the[Register]
attribute: it specifies that the managed class is wrapping an existing Objective-C class. For models (classes with the[Model]
attribute) this is incorrect. At the time this did not cause any ill effects, because the value didn't change any behavior.However, In our most recent release, d15-7, this changed, and now the value must be correct, otherwise the app will fail to build as mentioned above.
The binding generator was fixed in early 2015, which means that the problem only occurs with any binding libraries that haven't been updated since then (such as the CorePlot component).
The fix is to rebuild the binding project with a recent version of Xamarin.iOS (any version from the last two years would do). If the source code isn't available, there is also a command-line tool available that can fix the library.
Reference (fix): https://github.com/xamarin/maccore/commit/b9f39f537bb39fa69a1312be097f127901d7b652
The text was updated successfully, but these errors were encountered: