#29 MonoTouch Binding for ZBar iPhone SDK

iPhone (6)

This is a minimal MonoTouch binding for the ZBar iPhone SDK. It wraps the required types to show the ZBarReaderViewController, get the ZBarSymbolSet results, enumerate the contained ZBarSymbols, and access the various properties of the ZBarSymbol. It doesn't expose the ZBarImageScanner (yet).

A few notes/issues - let me know if you want me to address some of them:
- I've just zipped up the source files, I didn't want to make assumptions about where you would like to place this in the project tree.
- It's currently built via a MonoDevelop 'MonoTouch Binding Library' project. It could be replaced with a makefile...???
- It requires the compiled libzbar.a library in the same directory to build (MonoTouch now embeds the native library within the Mono dll along with required build flags - this allows user's to simply reference the Mono dll without having to worry about the native library dependencies and compiler flags)
- Should I also include the built ZBar.dll so others can just download it and run?

Basically, I'm not 100% sure on the best way to sort these issues out, but thought this would be useful to others so just wanted to get it out there somewhere. I've spent way too long already on this and need to move on to other things, so sorry this isn't as polished as it could be. But let me know if you want me to submit anything else and I'll squeeze it in.



  • Tyson

    Tyson - 2012-04-08
  • Tyson

    Tyson - 2012-05-01

    Updated MT binding with access to ZBarSymbol's within ZBarSymbolSet and the ZBarImageScanner

  • Tyson

    Tyson - 2012-05-01

    I can't seem to edit the above Details section so adding a comment instead:

    The newer 'V2' attachment below includes access to the underlying ZBarImageScanner (so different types of barcodes can be toggled), and also fixes access to the ZBarSymbolSet so you can enumerate its child ZBarSymbols and get actual barcode data.

  • John Sørensen

    John Sørensen - 2012-05-17

    Hey Tyson...
    Could You please give some short examples on how to call this bindings.

    John Sørensen

  • Brandon H.

    Brandon H. - 2012-11-12

    I, too, agree that examples of using this would be immensely useful. Web searches yield nothing and ZBar SDK docs aren't too helpful either.

  • Paul Donovan

    Paul Donovan - 2013-03-01

    V2 works like a charm in MonoTouch v6.20! Thanks very much for creating these C# bindings.

  • Tyson

    Tyson - 2013-03-02

    For those asking for samples: I have uploaded this code to GitHub, made a few minor improvements, and added a VERY BASIC sample. For more detailed samples I would recommend looking at the objective-c sample code on here - my MonoTouch (or Xamarin.iOS as they prefer now) bindings are a direct wrapper around the objective-c interfaces and should be a 1:1 port of objc -> c# code.

    Soon I will also be adding bindings for the underlying ZBarReaderView, and looking at a new branch for the ZBar SDK 1.3.1 support.


    Last edit: Tyson 2013-03-02

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks