zxing/iphone
2010-12-22 17:33:00 +00:00
..
Barcodes [iphone/barcodes] updated default screens 2010-11-29 11:56:44 +00:00
legacy/Barcodes_original [iphone] updated paths that were broken by move of the project in other directory 2010-11-14 16:22:05 +00:00
ScanTest [iphone] issue 606 fixed. 1 click build problem with ScanTest seems fixed. Base SDK is now temporarly 4.2 which I can change if people are having problem with this. Seems like issue 606 was due to some obscurely corrupted project config file 2010-11-09 10:23:23 +00:00
ZXingWidget [iphone/ZXingWidget] minor changes. Some syntax changed to make the code build with clang 2010-12-22 17:33:00 +00:00
README [iphone] updated README with more accurate instructions regarding Headers search path and Framework dependencies 2010-11-14 20:56:27 +00:00

ZXing for iOS is a sub-project of zxing project partially maintained by 
independent developers. As of 2nd of June 2010, it contains 3 iOS projects:
  - BarCodes: Original zxing iOS app. Available on app store. However, the code is currently not maintained and does not build
  - ZXingWidget: a Library that can be included in any iOS app
  - ScanTest: a simple test app for ZXingWidget


How to include ZXingWidget in a easy and clean way:
====================================================

  1. Locate the "ZXingWidget.xcodeproj" file under "`zxing/iphone/ZXingWidget/`". Drag ZXingWidget.xcodeproj and
     drop it onto the root of your Xcode project's "Groups and Files"  sidebar.  A dialog will
     appear -- make sure "Copy items" is unchecked and "Reference Type" is "Relative to Project"
     before clicking "Add".    
   
  2. Now you need to link the ZXingWidget static library to your project.  Click the "ZXingWidget.xcodeproj" 
	 item that has just been added to the sidebar.  Under the "Details" table, you will see a single
	 item: ZXingWidget.a.  Check the checkbox on the far right of ZXingWidget.a.
  
  3. Now you need to add ZXingWidget as a dependency of your project, so Xcode compiles it whenever
	 you compile your project.  Expand the "Targets" section of the sidebar and double-click your
	 application's target.  Under the "General" tab you will see a "Direct Dependencies" section. 
	 Click the "+" button, select "ZXingWidget", and click "Add Target"
  
  4. Headers search path 1: you need to tell your project where to find the ZXingWidget headers.  Open your
	 "Project Settings" and go to the "Build" tab. Look for "Header Search Paths" and double-click
	 it.  Add the relative path from your project's directory to the
	 "zxing/iphone/ZXingWidget/Classes" directory. Make sure you click the checkbox "recursive path" ! 
  5. Headers search path 2: You need to add zxing ccp headers to your headers search path, do this similarly as previous step to point the path to cpp/core/src/ where the 'zxing' directory is. You don't need to make this search path recursive so do not check the "recursive path" option

	6. Import the following iOS frameworks: AVFoundation, AudioToolbox, CoreVideo, CoreMedia and libiconv
 
  7. You're almost ready to go ..
  
  8. #import <ZXingWidgetController.h> from a file
  
  9. #import <QRCodeReader.h> for example because you will need to inject a barcode reader into ZXingWidgetController. 

  10. MAKE SURE the file in which you are using the code deader is a .mm because you are now silently including some c++ code. If you don't do so then
     the compiler will cry as if it does not find some files !

  11. It should work :)
  

Known issues for above steps to include:
======================================
  - It can happen that when trying to build your own project with ZXingWidgetController you get linker errors like 
    "undefined reference to". If this error looks like a c++ undefined reference, then renaming main.m into main.mm (Objective-C++ source suffix)
    may fix the problem
  
  - If you have building error like " ... : No such file or directory", then it is a classical error, it means that the path to includes is not well
    specified. The best way to fix this is to look at the Build Command that failed. To do that, click on the lower right corner of your Xcode project,
    you should see the build command that failed. Click on it and expand it by clicking on the "more" symbols that just appeared. This will make appear
    the exact command line instruction that is ran and fails. You can then make sure that the Header search path you specified is there, and you can also
    copy/paste this line into your terminal and try to see if you can reproduce/fix the error by adding the right path to the compiler. Once is is fixed,
    you should have an idea of what's the problem and accordingly modify your Header Search Path.