Zxing Integration Steps in iOS

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.