Refer to the online major God articles, their own summary below, welcome to correct and exchange! (Main reference: http://blog.csdn.net/brokge/article/details/9045629)
1. Download the Open Source Library (https://github.com/zxing/zxing) to GitHub
2. After obtaining the code, only the CPP part and iphone part are required, as follows:
3. Continue cropping the CPP and iphone folders as follows:
4. Add the modified Zxing folder to our target project, and drag the Zxingwidget.xcodeproj file to the project
5. Add a dependent framework:
avfoundation audiotoolbox corevideo coremedia Libiconv addressbook addressbookui
6.
7. Select project, targets,build settings, find header search path, add value:
./zxing/iphone/zxingwidget/classes Recursive
./ZXING/CPP/CORE/SRC non-recursive
My path is:
When this environment is built, the next step is to call
8. References:
#import <ZXingWidgetController.h> #import <QRCodeReader.h>
Don't forget to set up an agent
And then:
Attention:
1. Modify the current XXVIEWCONTROLLER.M file for XXVIEWCONTROLLER.MM Resolution: Iosstream File not found
2. This error can be eliminated by removing the "-werror" and "-wno-unused-parameter" two compilation options in the project where Zxing is located, under build setting other warning flags option. Workaround: Private field ' Cached_y_ ' is not used
recommend a good online generation QR Code of the website:http://cli.im/
Differences between. m files and. mm Files:
. m files are pure object-c files; . M can only call pure OBJECT-C classes and cannot call mixed
. MM is a mixed file of object-c and C + +; . MM can call Object-c, or you can call C + + 's
http://blog.csdn.net/ysy441088327/article/details/8515556 Summary is also very good.
From for notes (Wiz)
Zxing Integration Steps in iOS