Giter Site home page Giter Site logo

mohammed-khurram-ahmed / zxing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from twotoasters/zxing

0.0 0.0 0.0 1.79 MB

Fork just containing iOS components of the git-svn clone of http://zxing.googlecode.com/svn

Home Page: http://code.google.com/p/zxing/

zxing's Introduction

======

twotoasters/zxing is a fork of just the components needed to include the zxing library in an ios project. The full zxing library includes dozens of platforms and is pretty bloated at 100mb to drop into another project as a submodule, so this fork is just a stripped down copy intended for that purpose

======

Installation instructions (from iphone/README):

  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". Alternatively you can right-click on you project navigator and select 'Add files to "MyProject"'

  2. Now you need to link the ZXingWidget static library to your project. To do that, a. select you project file in the project navigator b. In the second column, select your target and not the project itself
    c. Go to the 'build phases' tab, expand the 'link binary with libraries' section, d. Click the add button A dialog will appear and you should see libZXingWidget.a in the very first possibilities

  3. Now you need to add ZXingWidget as a dependency of your project, so Xcode compiles it whenever you compile your project. a. like in substep c. of previous step, you nedd to do that in the 'build phases' tab of your target b. Expand the 'Target Dependencies' section c. Click the add Button and a dialog will appear select ZXingWidget target

  4. Headers search path 1: you need to tell your project where to find the ZXingWidget headers. Select your project in the project navigator, and the select your target and go to the "Build Settings" 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 cpp 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

    1. Import the following iOS frameworks: a. AVFoundation b. AudioToolbox c. CoreVideo d. CoreMedia e. libiconv f. AddressBook g. AddressBookUI This must be done by adding them in the 'Link Libraries with Binary' just like step 2.c.
  6. You're almost ready to go ..

  7. #import <ZXingWidgetController.h> in a source file

  8. #import <QRCodeReader.h> for example because you will need to inject a barcode reader into ZXingWidgetController.

  9. 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 may cry as if it does not find some files !

  10. It should work :)

zxing's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.