[MonoTouch] Using Objective C Framework - Guidance Required

Miljenko Cvjetko mcvjetko at holisticware.net
Tue Jan 31 07:50:50 UTC 2012


Hi guys

This is one quite new and good introductory article about this subject.

http://dantes-andreea.blogspot.com/2012/01/how-to-use-objective-c-library-in.html

and with the est I usually go to Xamarin site:
http://docs.xamarin.com/ios/advanced_topics/binding_objective-c_types

P-Invoke my favourite (follow links to MSDN from it):
http://www.mono-project.com/Interop_with_Native_Libraries

For generating PInvoke wrappers for .net from dlls and *.h files see:
http://www.swig.org/tutorial.html

 From MS interop team:
http://clrinterop.codeplex.com/releases/view/14120
I'm currently investigating this for some ideas...

regards

mel

On 2012.01.31 02:58, Jason Awbrey wrote:
> I think that you need to build an XCode library (.a) project, and then 
> write MT bindings for it
>
> I would really love to see a detailed step-by-step example of writing 
> bindings for an existing obj-c lib.  Every time I've started down this 
> path I've given up because the process seemed overwhelming
>
> On Mon, Jan 30, 2012 at 7:12 PM, JB 
> <jeff.butterworth at softwareresults.com.au 
> <mailto:jeff.butterworth at softwareresults.com.au>> wrote:
>
>     OK. I am stumped on this one. I feel like I am way out of my depth
>     :-( I am
>     using MonoDevelop 2.8.6.3 and Monotouch 5.0.4.
>
>     I have been given a barcode scanner hardware accessory that the
>     iPhone plugs
>     into. It has an SDK for working with the device. The SDK is a
>     framework.
>     There is a 'driver' file and 49 .h files. There is no .a file. The SDK
>     instructions show how to add the framework to an xcode project and
>     use it.
>     Seems pretty straight forward. Except I am using MonoTouch :-)
>
>     I've read:
>     -
>     http://docs.xamarin.com/ios/advanced_topics/binding_objective-c_types
>     - http://docs.xamarin.com/ios/advanced_topics/linking_native_libraries
>     -
>     http://dantes-andreea.blogspot.com/2012/01/how-to-use-objective-c-library-in.html
>
>     but they aren't making a lot of sense to me.
>
>     The Binding Object C Types document seems to assume I already have
>     a .a
>     static library to use. So do I create a static library in xcode
>     and simply
>     add the framework to it and compile it? Will that be enough to give me
>     access to the definitions in the 49 .h files of the framework?
>
>     The document also talks about btouch. That seems to take a number
>     of .cs
>     files and generates a dll. The dll gets added to my real project. What
>     happens to the .a file? If I am reading correctly that gets
>     included with
>     the LinkWith option?
>
>     Where do the .cs files come from? There are 49 .h files? I don't
>     translate
>     each one of the individually do I? Do Xamarin provide tools to
>     automate the
>     generation of the files?
>
>     A guiding hand would be appreciated. I can sort of see what needs
>     to be done
>     but think I just need a slap round the head to point me in the right
>     direction!
>
>     Cheers
>
>     Jeff
>
>
>     --
>     View this message in context:
>     http://monotouch.2284126.n4.nabble.com/Using-Objective-C-Framework-Guidance-Required-tp4343151p4343151.html
>     Sent from the MonoTouch mailing list archive at Nabble.com.
>     _______________________________________________
>     MonoTouch mailing list
>     MonoTouch at lists.ximian.com <mailto:MonoTouch at lists.ximian.com>
>     http://lists.ximian.com/mailman/listinfo/monotouch
>
>
>
>
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch


-- 
Miljenko Cvjetko dipl.ing. ET
	Direktor/CEO
	Projektant rjes(enja/Solution Architect	
	Razvojni programer/Senior developer
	Voditelj projekta/Project Manager

IX juz(na obala 13
Kajzerica Zagreb
T: 385 1 7775555
M: 385 91 557 447 3
F: 385 1 7779556
e: mcvjetko at holisticware.net
w: http://www.holisticware.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monotouch/attachments/20120131/edece67b/attachment.html>


More information about the MonoTouch mailing list