Bug 25847 - [Unified] ObjCRuntime.Messaging non-public breaks years worth of code
Summary: [Unified] ObjCRuntime.Messaging non-public breaks years worth of code
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 8.6.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-08 15:47 UTC by Frank A. Krueger
Modified: 2015-01-19 05:46 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
unofficial messaging dll (253.00 KB, application/octet-stream)
2015-01-08 17:10 UTC, Sebastien Pouliot
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED ANSWERED

Description Frank A. Krueger 2015-01-08 15:47:55 UTC
Making Messaging non-public breaks years of code.

I have always been able to rely on the Messaging class to work around missing APIs and such in MonoTouch. Now that the class is non-public, I have to write even worse workarounds.

PLEASE make it public again. Now I have to write my own class that mimics your Messaging. :-(

Why break backwards compatibility for no gain?

	Class klass = new Class ("UIScreen");
	_hasScreens = ObjCRuntime.Messaging.bool_objc_msgSend_IntPtr (klass.Handle, Selector.GetHandle ("respondsToSelector:"), Selector.GetHandle ("screens"));
Comment 1 Sebastien Pouliot 2015-01-08 16:03:10 UTC
They are generated code and appears (fine) and _disappears_ (problematic for public API) as needed. Also making them public has prevented us from making changes/optimizations to the internals.

We do have plans to make an helper (optional) assembly (.dll) that will contains the same functionality (and likely the API, with or without, simpler alternatives).
Comment 2 Sebastien Pouliot 2015-01-08 17:10:05 UTC
Created attachment 9293 [details]
unofficial messaging dll
Comment 3 Frank A. Krueger 2015-01-08 18:36:47 UTC
OK, thanks for looking into it. On further reflection, I was able to remove most of my uses so it's not as important as I worried it would be.
Comment 4 Sebastien Pouliot 2015-01-08 20:51:03 UTC
No problem, many people had the same initial reaction :-). Most of the uses we have seen so far are generally hacks (that we often provided) around old MT bugs or to enable missing features (that were added later).

Still if there's scenarios where they are still useful we want to know about them :-) Hopefully there's something better we can provide (in the future) and the external assembly can be used to bridge the gap until then.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2015-01-09 02:29:15 UTC
Here's a lot of objc_msgSend P/Invokes in source code version: https://gist.github.com/rolfbjarne/981b778a99425a6e630c