Accelerate, rotating images, 215-216
acceleration
catching events, 11
moving onscreen objects, 16-19
accelerometers
retrieving current angle synchronously, 13-16
sliding onscreen objects based on feedback, 17-19
achievements, Game Center
resetting, 385
activity item sources, Activity View controller, 55
Activity View controller, 54-62
activity item sources, 55
excluding activities, 62
HTML e-mail support, 62
item providers, 56
activityImage method, 58
activityTitle method, 58
activityType method, 58
activityViewController method, 59
adding contacts, Address Book, 331-333
contacts
accessing contact image data, 325-326
modifying and viewing, 334-335
searching for, 318-319, 322-325
sorting, 319
databases, 298
ABContact, 322
AddressBook UI, 298
instant-message properties, 313-315
retrieving and setting strings, 304-306
wrapping, 303
displaying in table cells, 326
multivalue data, storing, 311-312
creating, 317
functions, 304
Unknown Person Controller, 335-337
addresses, Address Book, 313-315
alerts, localizing, 465
altitude property (Core Location), 347
ambient audio, creating, 270-272
annotation property (document interaction controller), 71
annotations
API providers, request tokens, 188-189
APNS (Apple Push Notification Service), 448-451, 473-474. See also push notifications
handling token request errors, 456
multiple provider support, 448
notification payloads, building, 465-466
responding to notifications, 456-458
retrieving device token, 455-456
sending notifications, 466-471
App IDs, generating new, 451-454
Apple Push Notification Service (APNS). See APNS (Apple Push Notification Service)
application bundles, images, 197
in-app purchase items, creating, 431-435
developing and testing, 429
fonts, adding custom to, 118
assets library, reading images from, 202-203
attitude property (Core Motion), 22
attribute stacks, Core Text, 100-105
attributed strings, Core Text, 89-93
attributed text
Bezier paths, drawing along, 151-154
creating, pseudo-HTML, 105-109
attributes
layering via iterated ranges, 97-98
Game Center, sessions, 411-415
interruptions, handling, 272-274
Media Queries, creating, 288-290
MPMusicPlayerController, 290-294
picking, MPMediaPickerController, 286-288
playing with AVAudioPlayer, 261-269
authentication, handling challenges, 176-177
authorization, Core Location, 339-344
available disk space, checking, 35-36
AVAudioPlayer
audio interruptions, handling, 272-274
monitoring audio levels, 265-269
scrubbing, 264
AVFoundation cameras, accessing, 235-242
battery state, devices, monitoring, 6-8
Bezier paths, 166
attributed text, drawing along, 151-154
points
blocks, handler, Core Motion, 23-26
Bluetooth limitations, GameKit, 416
Bonjour sessions, GameKit, 416-417
bounding Bezier paths, 137-142
building simple web servers, 181-184
cameras, 229
AVFoundation, accessing, 235-242
CI (Core Image) filtering, 248-251
Exchangeable Image File Format (EXIF), 242-247
photographs, snapping, 229-233
previews, 240
laying out, 241
sessions, establishing, 237-239
canPerformWithActivityItems method, 58
catching, acceleration events, 11
chat, Game Center, 411-415, 423-424
testing availability, 412
CI (Core Image) filtering, 248-251
classes
code listings, 147-148. See also recipes
Adding Camera Previews (7-6), 241
Adding Images to Core Text Flow (3-4), 112-114
Application Activities (2-1), 59-62
Attributed String Core Text View (3-3), 109
Attributed String View (3-2), 109
Bezier Elements (4-1), 145-146
Building a Map Annotation Object (10-1), 363
Capturing Output (7-3), 238-239
Checking a Receipt (12-3), 444-445
Converting Between RGB and HSB (7-9), 259-260
Converting Geometry from EXIF to Image Coordinates (7-8), 252-254
Creating a Session (7-2), 237-238
Drawing an Image into a PDF File (6-2), 222-223
Embedding and Retrieving Previews (7-5), 240
Fitting Element-Based Bezier Paths (4-2), 147-148
Making a Screen Shot of a View (6-1), 222
Preparing Annotation Views for Use (10-2), 365
Products Request Callback Methods (12-1), 437-438
Recovering File System Size and File System Free Size (1-1), 36
Responding to Payments (12-2), 439-441
Retrieving Image Metadata (7-7), 243-244
Returning a Font from Its Traits (3-1), 99-100
Selecting from Available Cameras (7-4), 239-240
Serializing and Deserializing Property Lists (11-1), 396-397
conformance
retrieving lists, UTIs (Uniform Type Identifiers), 43-45
testing, UTIs (Uniform Type Identifiers), 42-43, 44-45
contacts, Address Book
accessing contact image data, 325-326
modifying and viewing, 334-335
sorting, 319
controllers
activity item sources, 55
excluding activities, 62
HTML e-mail support, 62
item providers, 56
properties, 71
MPMediaPickerController, picking audio, 286-288
MPMusicPlayerController, 292-294
document interaction controllers, providing support, 71-72
Unknown Person Controller, Address Book, 335-337
converting between coordinate systems, 210-211
convex hulls, bounding, 138-141
coordinate property (Core Location), 347
coordinate systems, converting between, 210-211
Core Image (CI) filtering, 248-251
Core Location, 339, 344-347, 369-370
location and privacy, resetting, 341
maps, creating annotations, 363-368
user locations
user permissions, checking, 343
testing for sensors, 22
attributed text
creating using pseudo-HTML, 105-109
creating image cut-outs, 112-114
drawing into scroll view, 114-116
adding custom to apps, 118
UIKit, 89
counting groups, Address Book, 319
course property (Core Location), 347
credentials
current angle, accelerometers, retrieving synchronously, 13-16
custom document types, creating, 77-78
data
date properties, Address Book, 306-307
databases, Address Book, 298
design, push notifications, 473
detecting
development
apps, 429
devices
accessing basic information, 1-2, 9-10
adding capability restrictions, 2-5
battery state, monitoring, 5-8
permissions, 3
proximity sensor, enabling/disabling, 5
required capabilities, 4
Retina support, detecting, 8-9
user permission descriptions, 3
disabling proximity sensor, 5
display links, screens, adding, 31
distribution, push notifications, 467-471
document file sharing, enabling, 49
document interaction controllers, 69-75
properties, 71
documents
Documents folder, scanning for new, 50-53
Documents folder
scanning for new documents, 50-53
Xcode access, 50
Ecamm’s Printopia, 55
enabling proximity sensor, 5
ending game play, GameKit, 407-410
events
acceleration, catching, 11
motion, detecting shakes, 27-28
EXIF (Exchangeable Image File Format), 242-247
face detection, CI (Core Image) filtering, 251-257
feedback service, APNS (Apple Push Notification Service), 471-472
file extensions, UTIs (Uniform Type Identifiers), 40-41
file system, recovering size, 36
files, PDFs, drawing into, 222-223
filtering images, CI (Core Image), 248-251
flashlights, cameras, enabling, 233-235
folders, Documents, monitoring, 48-53
fonts
apps, adding custom to, 118
frameworks Address Book, 297-322
AddressBook UI, 298
databases, 298
multivalue items, 307-309, 312-313
record functions, 304
retrieving and setting strings, 304-306
storing multivalue data, 311-312
wrapping, 303
Game Center, 371, 425-426. See also GameKit
achievements
resetting, 385
loading matches from, 403
view controller, displaying, 380
game play
responding to, GameKit, 403-407
achievements
resetting, 385
audio sessions, establishing, 412-413
Bluetooth limitations, 416
chat
creating, 413
starting and stopping, 413
state monitoring, 414
testing availability, 412
volume control, 415
Game Center view controller, displaying, 380
handling player state changes, 390-391
invitation handlers, creating, 388-389
leaderboards
matches
multiplayer matchmaking, 385-387
managing match state, 390
creating helper, 422
peer connection process, 417-421
peer-to-peer voice chat, 422-423
sending and receiving data, 421
state changes, 422
player names, retrieving, 392-393
session modes, 417
starting games, 388
turn-based invitations, responding to, 401-402
games, starting, GameKit, 388
geocoding, Core Location, 353-355
Geofencing, Core Location, 348-350
Bezier paths
drawing attributed text along, 151-154
velocity-based stroking, 136-137
view intersections, testing, 161-165
graphics. See images
gravity property (Core Motion), 22
GUIDs (Globally Unique Identifiers), 35
Hafeneger, Stefan, 467
handler blocks, Core Motion, 23-26
handling
authentication challenges, 176-177
player state changes, GameKit, 390-391
horizontalAccuracy property (Core Location), 347
HSB (hue, saturation, brightness), converting RGB (red, green, blue) to, 259-260
iCloud, images, 198
icons property (document interaction controller), 71
IIDs (Interface Identifiers), 35
image cut-outs, creating, Core Text, 112-114
assets library, reading from, 202-203
bitmap representations, 210-214
capturing view-based screen shots, 221-222
CI (Core Image) filtering, 248-251
converting data to and from bitmap data, 212-214
Exchangeable Image File Format (EXIF), 242-247
loading from URLs, 202
sources, 197
in-app purchase items, creating, 431-435
inheritance, UTIs (Uniform Type Identifiers), 40
instances, document interaction controller, creating, 69-71
Internet, images, 198
interruptions, audio, handling, 272-274
invitation handlers, GameKit, creating, 388-389
invitations, responding to, GameKit, 401
iPhone files, serving through Web service, 181-184
item providers, Activity View controller, 56
item source callbacks, Activity View controller, 56-57
items, Activity View controller, 62-63
iterated ranges, layering attributes via, 97-98
iTunes accounts, signing out, 438
JSON (JavaScript Object Notation)
serialization, 394
transforming from dictionary to, 465
laying out camera previews, 241
leaderboards
levels, audio, monitoring, 265-269
listings. See code listings; recipes
lists, conformance, retrieving, 43-45
loading
images from URLs, 202
local notifications versus push notifications, 451
location services, testing for, 339-341
locations, Core Location
resetting, 341
magneticField property (Core Motion), 22
maps, annotations, Core Location, 363-368
match state, GameKit, managing, 390
matchmaker fails, handling, 386-387
Media Queries, creating, 288-290
metadata
monitoring
battery state and proximity, 6-8
motion events, detecting shakes, 27-28
MPMediaPickerController, picking audio, 286-288
MPMusicPlayerController, 292-294
multipage Core Text, 120
multiplayer matchmaking, GameKit, 385-387
managing match state, 390
multivalue items, Address Book, 311-313
authentication, handling challenges, 176-177
credentials
web servers, building, 181-184
north, tracking, Core Location, 350-353
notifications (push), 447-449, 473-474
APNS (Apple Push Notification Service), 448-451
App IDs, generating new, 451-454
designing for, 473
limitations, 450
versus local notifications, 451
multiple provider support, 448
push client skeletons, 459-464
NSFileManager class, 36
onscreen objects, sliding based on accelerometer feedback, 17-19
Open menu, document interaction controllers, 72-75
orientations
calculating from accelerometers, 14-15
overscanning compensation, screens, 31
paragraph styles, Core Text, 92-93
passively updating, pasteboard, 47-48
images, 198
retrieving data, 47
storing data, 46
paths, Bezier, 166
drawing attributed text along, 151-154
points
retrieving points and slopes, 149-151
payloads, push notifications, building, 465-466
payments, responding to, StoreKit, 438-441
PDF (Portable Document Format) files, drawing into, 222-223
peer services, GameKit, 415-425
creating helper, 422
peer connection process, 417-421
peer-to-peer voice chat, 422-423
sending and receiving data, 421
state changes, 422
permissions, devices, 3
photo album, 197
photographs, snapping, 229-233. See also images
picking audio, MPMediaPickerController, 286-288
pictures. See images
player state changes, GameKit, handling, 390-391
prepareWithActivityItems method, 58
previews, cameras, 240
laying out, 241
Printopia, 55
privacy, Core Location, resetting, 341
processing images, 215-216, 219-221
production, push notifications, 467-471
properties
document interaction controllers, 71
proximity sensor, enabling/disabling, 5
pseudo-HTML, creating attributed text, 105-109
purchases
multiple, 442
push client skeletons, 459-464
push notifications, 447-449, 473-474
APNS (Apple Push Notification Service), 448-451
App IDs, generating new, 451-454
designing for, 473
limitations, 450
versus local notifications, 451
multiple provider support, 448
push client skeletons, 459-464
queries, Media Queries, creating, 288-290
querying
document interaction controllers, providing support, 71-72
recipes. See also code listings
Activity View Controller (2-4), 56-57
Adding a Simple Core Image Filter (7-5), 250-251
Adding Emitters (6-8), 226-228
Analyzing Bitmap Samples (7-7), 257-259
Applying Image Aspect (6-1), 205-207
Audio Recording with AVAudioRecorder (8-4), 276-280
Authentication with NSURLCredential Instances (5-3), 176-177
Basic Core Motion (1-6), 23-25
Basic OAuth Signing Utilities (5-6), 185-188
Big Text. Really Big Text (3-9), 123-125
Bounding Boxes and Convex Hulls (4-5), 138-141
Building Attributed Strings with an Objective-C Wrapper (3-3), 102-104
Catching Acceleration Events (1-3), 11
Catmull-Rom Splining (4-3), 133-134
Choosing Display Properties (9-4), 330-331
Controlling Torch Mode (7-2), 234-235
Converting to and from Image Bitmaps (6-3), 213-214
Convolving Images with the Accelerate Framework (6-5), 217-218
Core Image Basics (6-6), 220-221
Core Text and Scroll Views (3-5), 114-116
Creating a Font List (3-6), 117
Creating Ambient Audio Through Looping (8-2), 270-272
Creating an Annotated, Interactive Map (10-7), 366-368
Creating an Automatic Text-Entry to Pasteboard Solution (2-2), 48
Creating Reflections (6-7), 224-226
Credential Helper (5-1), 169-171
Detecting Faces (7-6), 255-257
Detecting the Direction of North (10-3), 351-352
Displaying Address Book Images in Table Cells (9-2), 326
Document Interaction Controllers (2-7), 73-75
Drawing to PDF (3-8), 121
Establishing a Game Center Player (11-1), 374
Establishing an Audio Session for Voice Chat (11-19), 412-413
Exposing Image Metadata (7-4), 245-246
Extending Device Information Gathering (1-2), 9-10
Extracting Bezier Path Points (4-1), 128-129
Fitting Paths into Custom Rectangles (4-6), 143-144
Handling Incoming Documents (2-8), 79-81
Handling Invitations (11-14), 401
Handling Turn Events (11-16), 404-407
Helper Class for Cameras (7-3), 241-242
Implementing an Invitation Handler (11-9), 389
Layering Attributes Via Iterated Ranges (3-2), 97-98
Laying Out Text Along a Bezier Path (4-8), 152-154
Loading Matches from Game Center (11-15), 403
Loading Opponent Name (11-11), 392
Monitoring Proximity and Battery (1-1), 6-8
Multipage Core Text (3-7), 120
Obliterating Game Center Matches for the Current Player (11-18), 410-411
Password Entry View Controller (5-2), 172-175
Playing Back Audio with AVAudioPlayer (8-1), 265-269
Presenting the Game Center View Controller (11-3), 381
Presenting User Location Within a Map (10-5), 357-360
Providing URL Scheme Support (2-9), 84
Pseudo HTML Markup (3-4), 106-109
Push Client Skeleton (13-1), 461-464
Pushing Payloads to the APNS Server (13-2), 468-471
Recording with Audio Queues: The Recorder.m Implementation (8-5), 280-285
Recovering Address Information from Coordinates and Descriptions (10-4), 354-355
Requesting a Match Through the Match Maker (11-7), 386
Responding to a Found Match (11-8), 387-388
Responding to Player State (11-10), 391
Retrieving Leaderboard Information (11-2), 379-380
Retrieving Points and Slopes from Bezier Paths (4-7), 149-151
Retrieving Transform Values (4-10), 162-165
Rolling for First Position (11-12), 397-398
Rotating an Image (6-2), 209-210
Rotating Images with the Accelerate Framework (6-4), 215-216
Selecting and Displaying Contacts with Search (9-1), 323-325
Selecting Music Items from the iPod Library (8-6), 287-288
Serving iPhone Files Through a Web Service (5-5), 181-184
Simple Media Playback with the iPod Music Player (8-7), 292-294
Sliding an Onscreen Object Based on Accelerometer Feedback (1-4), 17-19
Snapping Pictures (7-1), 232-233
Starting a Match (11-13), 399-400
Storing the Interruption Time for Later Pickup (8-3), 272-274
Submitting User Scores (11-4), 382
Testing Achievements (11-5), 383
Testing Conformance (2-1), 44-45
Thinning Bezier Path Points (4-2), 131-132
Tracking the Device Through the MapView (10-6), 361-362
Transformed View Access (4-9), 159-161
Unlocking Achievements (11-6), 384
Uploading Images to imgur (5-4), 178-181
Using a kqueue File Monitor (2-3), 51-53
Using Basic Attributed Strings with a Text View (3-1), 93-94
Using Core Location to Geofence (10-2), 349-350
Using Core Location to Retrieve Latitude and Longitude (10-1), 345-346
Using Device Motion Updates to Fix an Image in Space (1-7), 26-27
Using the New Person View Controller (9-5), 331-333
Velocity-Based Stroking (4-4), 136-137
Working with the Unknown Controller (9-6), 336-337
records, Address Book, 298-299
creating, 317
functions, 304
registering
relative angles, calculating, 15-16
removing contacts, Address Book, 331-333
reporting, Game Center achievements, 383-385
request tokens, API providers, 188-189
resetting achievements, GameKit, 385
responder styles, Core Text, 98-100
Retina support, detecting, 8-9
retrieving
current angle synchronously, accelerometers, 13-16
data, system pasteboard, 47
strings, Address Book, 304-306
RGB (red, green, blue) color codes, converting to HSB, 259-260
rotating images, 209-210, 215-216
rotationRate property (Core Motion), 22
sandbox
images, 198
schemes, URL, declaring, 82-83
scores, submitting, GameKit, 381-382
screen shots, capturing view-based, 221-222
screens
display links, adding, 31
overscanning compensation, 31
retrieving resolutions, 30
scroll views
Core Text, drawing into, 114-116
searches, contacts, Address Book, 318-319, 322-325
sending push notifications, 466-471
sensors
proximity, 5
testing for, Core Motion, 22
serializing data, GameKit, 394-397
services, Activity View controller, 62-63
session modes, GameKit, 417
sessions, cameras, establishing, 237-239
setting strings, Address Book, 304-306
shakes, detecting, motion events, 27-28
signing in to Game Center, 373-374
slopes, Bezier paths, retrieving, 149-151
social profiles, Address Book, 313-315
sorting contacts, Address Book, 319
sound. See audio
speed, tracking, Core Location, 347-348
storage, credentials, secure, 167-171
storefront GUI, building, 435-438
apps
developing and testing, 429
development paradox, 428
in-app purchase items, creating, 431-435
purchases
storefront GUI, building, 435-438
test accounts, creating, 430-431
storing data, system pasteboard, 46
strings
Address Book, retrieving and setting, 304-306
support, documents, declaring, 75-82
synchronizing data, GameKit, 397-398
retrieving data, 47
storing data, 46
TCP (Transmission Control Protocol), 393
test accounts, StoreKit, creating, 430-431
testing
apps, 429
conformance, UTIs (Uniform Type Identifiers), 42-45
Game Center achievements, 382-383
for location services, 339-341
URLs, 83
text displays, large text, 122-125
Text View, attributed strings, 93-94
thinning Bezier path points, 129-132
timestamp property (Core Location), 347
tokens, retrieving and storing, 189
torch mode, controlling, 234-235
tracking speed, Core Location, 347-348
tracking users, 35
values
view point locations, retrieving, 158-161
Transmission Control Protocol (TCP), 393
turn-based invitations, responding to, GameKit, 401-402
turn-by-turn matchmaking, GameKit, 399-401
turn events, handling, 404-407
UDP (User Datagram Protocol), 393
UIDevice class, 1-2, 5-9, 12-13
UIKit, Core Text, 89
Uniform Type Identifiers (UTIs). See UTIs (Uniform Type Identifiers)
Unknown Person Controller, Address Book, 335-337
URL-based services, creating, 82-84
URL property (document interaction controller), 71
URLs (uniform resource locators)
images, loading from, 202
testing, 83
user acceleration property (Core Motion), 22
user controls, Documents folder, 49-50
User Datagram Protocol (UDP), 393
user locations, Core Location
user permissions, Core Location, checking, 343
users, tracking, 35
UTI property (document interaction controller), 71
UTIs (Uniform Type Identifiers), 39-45
inheritance, 40
producing preferred extensions or MIME types, 41-42
UUIDs (Universally Unique Identifiers), 35
values, transforms
velocity-based stroking, 135-137
verticalAccuracy property (Core Location), 347
view-based screen shots, capturing, 221-222
View Controller, Address Book contacts, 331-333
view intersections, testing, 161-165
view point locations, transforms, retrieving, 158-161
viewing user locations, Core Location, 355-360
views, accelerometer-based scroll, 19-21
web servers, building, 181-184
wrapping
Address Book framework, 303
UIImage, 244
Xcode access, Documents folder, 50
3.139.97.53