Hi
If I'm building a Mac OSX desktop application in, say, Objective-C, or Swift, what steps must i take to expose my application's objects, classes, properties, and methods to a Xamarin application, so the Xamarin app can automate my non-Xamarin app?
thx
Answers
If you have an obj-c library, then you can us a binding project to be able to invoke those from C#.
https://developer.xamarin.com/guides/ios/advanced_topics/binding_objective-c/
There is a tool called Objective Sharpie - https://developer.xamarin.com/guides/cross-platform/macios/binding/objective-sharpie/ that can help automate the initial creation.
If you just want to poke various controls on screen the NSAccessibility APIs may be useful.
Swift is a bit more complicated. Right now, we currently don't have support for invoking Swift in the generic case. However, if you mark your objects with @ObjC then everything I said about obj-c should apply.
Thx for knowledgeable reply, Chris!
Yep. Swift objects w\ @ObjC.
This is what happens when I post before finishing my coffee.
no, your first answer was clear, so i removed my unnecessary followup question, thus making your followup answer unnecessary. This is what happens when i read before beginning my coffee.
but your confirmation is helpful! thx!
deleted