Is there already a barcode framework for the iphone?
Not sure if this will help but here is a link to an open source QR Code library. As you can see a couple of people have already used this to create apps for the iphone.
Wikipedia has an article explaining what QR Codes are. In my opinion QR Codes are much more fit for purpose than the standard barcode where the iphone is concerned as it was designed for this type of implementation.
You could take a look at Stefan Hafeneger's iPhone DataMatrix Reader Source Code if it's still available.
Yes, we produced the 'Barcodes' application for the iPhone. It can decode QR Codes. The source code is vailable from the zxing project; specifically, you want to take a look at the iPhone client and the partial C++ port of the core library. The port is a little old, from circa the 0.9 release of the Java code, but should still work reasonably well.
If you need to scan other formats, like 1D formats, you could continue the port of the Java code within this project to C++.
There's another option for this now if you are open to licensing an SDK. Check out the RedLaser SDK that works for UPCA/EAN13 with or without autofocus. Recently updated.
I'm a founder of the computer vision startup that built this new scanner, just FYI.
To read UPC-A and EAN-13 on all iPhone models (including the original and 3G without autofocus), there is the commercial library VSBarcodeReader developed by Vision Smarts. The same library powers the free comparison shopping app pic2shop.
The problem with iPhone camera is that the first models (of which there are tons in use) have a fixed-focus camera that cannot take picture in-focus for distances under 2ft. The images are blurry and distorted and if taken from greater distance there is not enough detail/information from the barcode.
A few companies have developed iPhone apps that can accomodate for that by using advanced de-blurring technologies. Those applications you can find on Apple app store: pic2shop, RedLaser and ShopSavvy. All of the companies have announced that they have also SDKs available - some for free or very preferential terms, check that one out.
Red Laser is expensive though. They ask 10% of your sales of which an upfront fee of $2500.
I wanted to user VSBarcodeReader, but Vision Smarts quoted me a price of $7000 USD and 10% of my sale price.
Check out ZBar (http://zbar.sourceforge.net/iphone/index.html) reads QR Code and ECN/ISBN codes and is available as under the Apache license.
Big in Japan (disclaimer:me) has recently made their SDK available. And it's free! Check out http://www.freebarcodescanner.com
Not for reading or decoding but for creating barcodes on the phone: A free (as in beer) library for iPhone OS can be found here:
http://www.softmatic.com/iphone.php
All common code types are supported (1D and 2D). Disclaimer: We are the developers.