Table of Contents

Copyright

Brief Table of Contents

Table of Contents

Preface

Acknowledgments

About this Book

About the Cover Illustration

Chapter 1. Barcodes, iOS, and you

1.1. The evolution of barcodes

1.1.1. One dimension: laser

1.1.2. Two dimensions: CCD

1.1.3. Versatility is winning

1.1.4. Where are the bars?

1.2. Barcode symbologies in iOS

1.2.1. 1D barcodes in iOS

1.2.2. 2D barcodes in iOS

1.2.3. So many choices: which barcode should I use?

1.3. Summary

Chapter 2. Media capture with AV Foundation

2.1. Introducing AV Foundation

2.2. Building a camera app

2.2.1. AV Foundation setup

2.2.2. Building the camera UI

2.2.3. Selecting capture devices

2.2.4. Media capture session

2.2.5. Showing live video preview

2.2.6. Authorizing camera access (or not)

2.2.7. Toggling the video light

2.2.8. Taking pictures to the camera roll

2.2.9. Supporting rotation of device and UI

2.2.10. Switching between camera devices

2.2.11. Implementing autofocus and tap-to-focus

2.3. Summary

Chapter 3. Scanning barcodes

3.1. Metadata detection in AV Foundation

3.2. Building a QR Code scanner

3.2.1. Reusing camera code

3.2.2. Creating and configuring the metadata output

3.2.3. Wiring up the metadata objects’ delegate

3.2.4. Creating a barcode scan delegate

3.2.5. Marking detected barcodes on preview

3.2.6. Building an optimal scanning UI

3.2.7. Tweaking capture device settings

3.2.8. Opening a scanned web address in Mobile Safari

3.3. Summary

Chapter 4. Passbook, Apple’s digital wallet

4.1. Barcodes in Passbook

4.2. Producing digital passes for your users

4.2.1. Requesting a certificate for signing passes

4.2.2. Preparing signing certificates

4.2.3. Constructing passes

4.2.4. Pass creation takeaways

4.3. Validating passes

4.3.1. Building a ticket-verifier app

4.3.2. Reusing barcode scanner code

4.3.3. Serverless pass validation

4.3.4. Pass validation takeaways

4.4. Summary

Chapter 5. Generating barcodes

5.1. Producing barcodes for display or print

5.1.1. Thoughts on barcode size

5.1.2. QR Code error correction

5.2. Generating 2D barcodes

5.2.1. Building a QR Code Builder app

5.2.2. Introducing Core Image

5.2.3. Project setup for Core Image

5.2.4. Generating QR Codes with Core Image

5.2.5. Copying the QR Code to the pasteboard

5.2.6. Private APIs for Aztec and PDF417 codes

5.2.7. Printing barcodes with AirPrint

5.2.8. Saving trees with the iOS Printer Simulator

5.2.9. Custom drawing with UIPrintPageRenderer

5.2.10. AirPrint paper selection

5.2.11. QR Code Builder app summary

5.3. Generating 1D barcodes

5.3.1. Building a Serial Number Tag app

5.3.2. Introducing BarCodeKit

5.3.3. Adding BarCodeKit to your project

5.3.4. Setting up the Serial Number Tag app’s UI

5.3.5. Generating 1D barcodes with BarCodeKit

5.3.6. AirPrint and roll-feed printers

5.3.7. Serial Number Tag app summary

5.4. Summary

Chapter 6. Getting metadata for barcodes

6.1. Modern networking with NSURLSession

6.1.1. File downloads with NSURLSessionDownloadTask

6.1.2. Building a Music Collection app

6.1.3. Asynchronous Core Data updates

6.1.4. Presenting the barcode scanner modally

6.1.5. Using NSURLSessionDataTask to call RESTful web APIs

6.1.6. Authenticating API requests with OAuth

6.1.7. Adding DTOAuth to your project

6.1.8. Configuring the OAuth consumer

6.1.9. Implementing the UI for OAuth authorization

6.1.10. Connecting barcode scanning and metadata retrieval

6.2. Unit-testing network operations

6.2.1. Introducing NSURLProtocol

6.2.2. Implementing a custom URL scheme with NSURLProtocol

6.2.3. Stubbing NSURLRequest responses with DTURLProtocolStub

6.2.4. Stubbing NSURLSession requests with DTURLProtocolStub

6.2.5. How to test asynchronous completion handlers

6.2.6. Shifting to test-driven development

6.3. Summary

Chapter 7. Putting barcodes in context

7.1. Understanding multiple layers of context

7.2. Building a YardSale app

7.2.1. Creating the outside-the-store experience

7.2.2. Implementing the in-store user interface

7.3. Geofencing store locations

7.3.1. Introducing region monitoring

7.3.2. Monitoring an unlimited number of regions

7.3.3. Updating monitored regions based on user location

7.3.4. Notifying users when entering a monitored region

7.4. Enhancing the in-store UI with iBeacons

7.4.1. Introducing the iBeacon system

7.4.2. iBeacon monitoring at a glance

7.4.3. Making any app emit an iBeacon

7.4.4. Determining distance to iBeacons with ranging

7.4.5. Adding an in-store barcode scanner

7.5. Summary

Appendix A. History of the UPC

A.1. Bull’s-eye origins

A.2. Startup story

Military efficiency improving the grocery industry

Confusion in numbers

CEO-driven development

Making it machine-readable

And the winner is ...

A.3. UPC plus EAN equals GTIN

A.4. Barcodes in the mobile age

A.5. Summary

Appendix B. GTIN prefix ranges

Appendix C. GS1-128 application identifiers

Index

List of Figures

List of Tables

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.196.59