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 <[email protected]
> 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
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to