مشخصات کتاب
-
Oliver Drobnik
-
2016
-
انگلیسی
-
27401
-
566
-
0
Barcodes with iOS
preface xi
acknowledgments xiii
about this book xv
about the cover illustration xvii
1 Barcodes, iOS, and you 1
1.1 The evolution of barcodes 3
One dimension: laser 4 ■ Two dimensions: CCD 5 ■ Versatility
is winning 6 ■ Where are the bars? 6
1.2 Barcode symbologies in iOS 6
1D barcodes in iOS 7 ■ 2D barcodes in iOS 13 ■ So many
choices: which barcode should I use? 16
1.3 Summary 16
2 Media capture with AV Foundation 18
2.1 Introducing AV Foundation 19
2.2 Building a camera app 20
AV Foundation setup 22 ■ Building the camera UI 24
Selecting capture devices 25 ■ Media capture session 28
Showing live video preview 29 ■ Authorizing camera access (or
not) 32 ■ Toggling the video light 34 ■ Taking pictures to the
camera roll 36 ■ Supporting rotation of device and UI 39
Switching between camera devices 41 ■ Implementing autofocus
and tap-to-focus 44
2.3 Summary 46
3 Scanning barcodes 48
3.1 Metadata detection in AV Foundation 49
3.2 Building a QR Code scanner 49
Reusing camera code 51 ■ Creating and configuring the metadata
output 53 ■ Wiring up the metadata objects’ delegate 54
Creating a barcode scan delegate 55 ■ Marking detected barcodes
on preview 58 ■ Building an optimal scanning UI 61
Tweaking capture device settings 65 ■ Opening a scanned web
address in Mobile Safari 67
3.3 Summary 68
4 Passbook, Apple’s digital wallet 70
4.1 Barcodes in Passbook 71
4.2 Producing digital passes for your users 72
Requesting a certificate for signing passes 72 ■ Preparing signing
certificates 76 ■ Constructing passes 78 ■ Pass creation
takeaways 88
4.3 Validating passes 88
Building a ticket-verifier app 90 ■ Reusing barcode scanner
code 90 ■ Serverless pass validation 92 ■ Pass validation
takeaways 94
4.4 Summary 95
5 Generating barcodes 97
5.1 Producing barcodes for display or print 98
Thoughts on barcode size 99 ■ QR Code error correction 99
5.2 Generating 2D barcodes 100
Building a QR Code Builder app 101 ■ Introducing Core
Image 101 ■ Project setup for Core Image 104 ■ Generating QR
Codes with Core Image 107 ■ Copying the QR Code to the
pasteboard 109 ■ Private APIs for Aztec and PDF417 codes 111
Printing barcodes with AirPrint 112 ■ Saving trees with the iOS
Printer Simulator 114 ■ Custom drawing with
UIPrintPageRenderer 115 ■ AirPrint paper selection 118 ■ QR
Code Builder app summary 118
5.3 Generating 1D barcodes 119
Building a Serial Number Tag app 119 ■ Introducing
BarCodeKit 120 ■ Adding BarCodeKit to your project 121
Setting up the Serial Number Tag app’s UI 124 ■ Generating 1D
barcodes with BarCodeKit 126 ■ AirPrint and roll-feed
printers 128 ■ Serial Number Tag app summary 131
5.4 Summary 131
6 Getting metadata for barcodes 133
6.1 Modern networking with NSURLSession 134
File downloads with NSURLSessionDownloadTask 135 ■ Building a
Music Collection app 137 ■ Asynchronous Core Data updates 138
Presenting the barcode scanner modally 140 ■ Using
NSURLSessionDataTask to call RESTful web
APIs 142 ■ Authenticating API requests with OAuth 149
Adding DTOAuth to your project 151 ■ Configuring the OAuth
consumer 152 ■ Implementing the UI for OAuth authorization 154
Connecting barcode scanning and metadata retrieval 156
6.2 Unit-testing network operations 159
Introducing NSURLProtocol 159 ■ Implementing a custom URL
scheme with NSURLProtocol 160 ■ Stubbing NSURLRequest
responses with DTURLProtocolStub 163 ■ Stubbing
NSURLSession requests with DTURLProtocolStub 166 ■ How to
test asynchronous completion handlers 168 ■ Shifting to testdriven
development 169
6.3 Summary 170
7 Putting barcodes in context 172
7.1 Understanding multiple layers of context 173
7.2 Building a YardSale app 174
Creating the outside-the-store experience 176 ■ Implementing the
in-store user interface 181
7.3 Geofencing store locations 183
Introducing region monitoring 183 ■ Monitoring an unlimited
number of regions 184 ■ Updating monitored regions based on
user location 186 ■ Notifying users when entering a monitored
region 189
7.4 Enhancing the in-store UI with iBeacons 194
Introducing the iBeacon system 195 ■ iBeacon monitoring at a
glance 196 ■ Making any app emit an iBeacon 197
Determining distance to iBeacons with ranging 198 ■ Adding an
in-store barcode scanner 201
7.5 Summary 204
appendix A History of the UPC 205
appendix B GTIN prefix ranges 212
appendix C GS1-128 application identifiers 217
index 221
Learn cocos2D Game Development with iOS 5
Learn cocos2D Game Development with iOS 5
نویسنده: Steffen Itterheim, Andreas Löw
زبان: انگلیسی