Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Uunrecognized selector issue. Example code below, entry is a UITextView:
Version: 220.127.116.11 (Business Edition)
That can happen (it's not a bug). `GetPosition` calls the `positionWithinRange:atCharacterOffset:` selector.
This selector is defined in an ObjC protocol: `UITextInput` . `UITextView`  conforms to the `UITextInput` protocol.
However, unlike C# interfaces, some protocol members can be optional. IOW `UITextInput` does not have to implement everything from `UITextInput`.
If it does not implement it (and you call it) then you'll get a "unrecognized selector sent to instance" message. This is a reason why you'll often see ObjC code that calls `respondToSelector` before calling some code. You can do the same (check) in your code.
Note: Newer version of XI handle protocols differently but, for backward compatibility, you'll still find some "protocol" members inside types (like UITextView). It makes it clearer that the method comes from a protocol (but it does not change what the native ObjC type implements).