I was able to get RegisterUndoWithTarget working, but PrepareWithInvocationTarget kept crashing.
I think it is due to some proxy support we don't have yet the customer was referencing?
Created attachment 9935 [details]
I found the RegisterUndoWithTarget example I hacked up and attached. Need to test w/ PrepareWithInvocationTarget.
This will be fixed in XM 2.0 (mid year), but won't be pleasant. For invocation based undo, you have to send a message to the proxy that the undo returns, which when you are normally invoking a c# method is unfortunate. I have it working internally but you get to call IntPtr_objc_msgSend_* on your own exported selectors. Sticking with RegisterUndoWithTarget might be easier even with the fix.
Fixed in master / d2d5c9cfe38560288c6020c96d410a03ed845050
Chris, I'm not sure this is the best way to solve it, I had another idea (for XI) in bug #26919 which might be bettetr.
I ended up reverting the patch, since it crashes the unit tests.
To fix this right, we really need to fix https://bugzilla.xamarin.com/show_bug.cgi?id=22940 first.