Index

A

Accessories (HomeKit)

Accessory Simulator tests, 179-180

configuring, 171-175

discovering, 162

first time setups, 162

achievements (games), 85, 87, 107

Achievement Challenges, 94-97

achievement precision, storing, 102-103

authenticating, 88

caching, 89-90

completion banners, 93

creating, 85-86

customizing, 105-107

earned/unearned achievements, 98-99

Hidden property, 87

hooks, 92-93

iTunes Connect, adding achievements to, 86

localization information, 87

multiple session achievements, 101-102

partially earned achievements, 99-100

piggybacked achievements, 102-103

Point Value attribute, 87

progress, displaying, 87-88

reporting, 90-92

resetting, 104-105

timer-based achievements, 103-104

Whack-a-Cac sample app, 97-98

Action Extensions, 238

action sets (HomeKit), 162, 178-179

actions (HomeKit), 178-179

scheduling, 181

triggers, 181

Address Book, 109, 111-113, 126

GUI. See People Picker (Address Book)

labels, 115-116

limitations of, 110

memory management, 113-114

People Picker, 118-120

creating contacts, 122-125

customizing, 120

editing contacts, 120-121

viewing contacts, 120-121

privacy and authorization, 110

reading

data from Address Book, 113-114

multivalues from Address Book, 114-115

sample app, 110

street addresses, handling, 116-117

support, importance of, 109

AirPrint, 259, 270

error handling, 264

PDF, printing, 269-270

Print Center app, 266-267

print jobs, starting, 264-265

Print sample app, 260

printer compatibility, 259

Printer Simulator tool, 259, 265

Printopia, 259

rendered HTML, printing, 268-269

testing, 259, 261

text, printing, 261-262

configuring print info, 262-263

duplexing, 262-263

error handling, 264

page ranges, 263-264

UIPrintInteractionControllerDelegate, 267

animations

collection views, 395, 413

change animations, 416-417

layout animations, 414-416

layout changes, 413-414

UIKit Dynamics, 1, 14

attachments, 7-8

classes of, 2

collisions, 3-6

dynamic behavior, 2

gravity, 3-4

introduction to, 2

item properties, 11-13

push forces, 10-11

sample app, 1

snaps, 9

springs, 8-9

UIAttachmentBehavior class, 2

UICollisionBehavior class, 2

UIDynamicAnimator, 2-3, 13

UIDynamicAnimatorDelegate, 13

UIDynamicItem protocol, 1, 12

UIDynamicItemBehavior class, 2

UIGravityBehavior class, 2

UIPushBehavior class, 2

UISnapBehavior class, 2

annotations in Map apps, 28

adding, 28-31

custom views, 31-33

displaying, 31-33

draggable views, 34

standard views, 31-33

API (Application Programmer Interface) extension limitations, 239

APN (Apple Push Notifications), 195-196, 216

Apple documentation, 214

Development Push SSL Certificates, 200

feedback, 215

App ID and push notifications, 196-199

Apple Maps, 15

Apple Watch Extensions, 244-247

asset collections (photo library), 453-457

assets

asset collections (photo library), 459-461

CloudKit, 222

photo library, 457-458, 462-464

attachments (physics simulations), UIKit Dynamics, 7-8

attributes, adding to managed object models in Core Data, 280

authenticating

achievements in Game Center, 88

leaderboards in Game Center, 68-69

common errors, 69-71

iOS 6 and newer authentication, 71-73

automation (home). See HomeKit

B

background-task processing, 333, 339, 344

background availability, checking for, 334-335

BackgroundTasks sample app, 334

expiration handlers, 337

GCD and performance, 349-351

identifiers, 336

LongRunningTasks sample app, 349-351

multitasking availability, checking for, 335

music, playing in a background, 340-342

tasks

completing, 337-339

executing, 335-336

types of background activities, 339-340

boarding passes (Passbook), 469

body temperature data, reading/writing in HealthKit, 155-160

breakpoints (debugging), 506

customizing, 507-508

exception breakpoints, 508

scope of, 508-509

symbolic breakpoints, 508

C

caching achievements (games), 89-90

Carmageddon, 3

CloudKit, 217-218, 220, 222, 235

account setup, 217-219

assets, 222

CloudTracker sample app, 218, 228

containers, 220

dashboard and data management, 233-235

databases, 221

iCloud capabilities, enabling, 220

push notifications, 227

record identifiers, 222

record zones, 222

records, 221-222

creating, 224-226

fetching, 223

saving, 224-226

updating, 226

subscriptions to data changes, 227-228

user discovery/management, 229-233

CloudTracker sample app, 218, 228

coders/keyed archives and persistent data, 272

collection views, 395-396, 417

animations, 395, 413

change animations, 416-417

layout animations, 414-416

layout changes, 413-414

custom layouts, creating, 408-413

data source methods, 398-401

delegate methods, 401-402

flow layouts, 395-396, 403-408

organizing, 395

PhotoGallery sample app, 395-396

setup, 397-398

collisions (physics simulations) and UIKit Dynamics, 3-6

Combined Leaderboards, 64

completion banners (achievements), 93

concurrent operations, running, 351-352

configuring

Handoff, 251-252

HomeKit, 162-179

leaderboards, 64

contacts (Address Book)

creating, 122-125

customizing, 120

editing, 120-121

viewing, 120-121

containers (CloudKit), 220

content specific highlighting and TextKit, 427-431

Continuity and Handoff, 249, 257

advertisements, 249-251

configuring, 251-252

continuation, 250-251

document-based apps, implementing in, 255-257

HandOffNotes sample app, 249

implementing, 251-257

introduction to, 249-251

testing, 251

user activity

continuing, 253-255

creating, 252-253

continuous gesture recognizers, 435

Cook, Tim, 244

coordinate systems in Map apps, 25

Core Data, 271-273, 303

default data setup, 282

data model version migrations, 284

inserting new managed objects, 282-284

loading data from Web services/API, 284

environment of, 275-278

EOF and, 271

features of, 271

fetched results controller, 292, 298-299

deleting rows, 298

inserting new sections, 297

inserting rows, 298

integrating table view with, 294-296

moving rows, 298

preparations for, 292-294

removing rows, 298

removing sections, 297-298

responding to content changes, 296-299

updating rows, 298

managed object models, building, 278-279

adding attributes to, 280

creating entities, 280

customized subclasses, 282

establishing relationships, 281

managed objects, 299

adding, 299-300

creating fetch requests, 285-287

displaying, 285-291

displaying object data, 288-290

editing, 301

fetching by object ID, 287

predicates, 290-291

removing, 300-301

rolling back changes, 301-303

saving changes, 301-303

MyMovies sample app, 273

displaying object data, 288-290

friend chooser, 285-287

movie display view, 287

movie list view controller, 292-299

predicates, 290-291

Shared Movies tab, 291

projects, starting, 274-278

SQLite, 271

table view, integrating with fetched results controller, 294-296

Core Image filters, 383, 394

face detector, 391

processing facial features, 392-394

setup, 391-392

filters

attributes of, 386-388

categories of, 383-386

chaining, 390-391

images

initializing, 388-389

rendering filtered images, 389-390

Core Location, 15

FavoritePlaces sample app

purpose of, 15

user location requests, 16-24

geofencing (regional monitoring), 43

boundary definitions, 44-45

monitoring changes, 45-46

regional monitoring capability checks, 43-44

importing, 16

user location requests, 16

location services checks, 19

parsing location data, 22-23

permissions, 16-19

requirements, 16-19

significant location change notifications, 23

starting requests, 19-22

testing locations, 23-24

understanding data, 22-23

Core Text, 419

coupons (Passbook), 469-471

CSV (Comma Separated Values) and persistent data, 273

Custom Keyboard Extensions, 238

customizing

achievements (games), 105-107

breakpoints (debugging), 507-508

flow layouts (collection views), 403

basic customizations, 403-404

decoration views, 405-408

leaderboards, 81-82

People Picker (Address Book), 120

D

dashboard (CloudKit) and data manager, 233-235

data security. See security

databases

CloudKit, 221

object databases. See Core Data

debugging, 503, 519-520

breakpoints, 506

customizing, 507-508

exception breakpoints, 508

scope of, 508-509

symbolic breakpoints, 508

first computer bug, 504

Instruments, 510-511, 519

interface of, 511-514

Leaks instrument, 516-518

Time Profiler instrument, 514-516

introduction to, 503-504

Xcode, 504-505, 509-519

decoration views (collection views), 405-408

developers (game) and physics simulations, 3

development provisioning profiles and push notification tests, 203-207

Development Push SSL Certificates, 200-203

dictionaries (Keystone sample app), securing, 368-370

Dijkstra, Edsger W., 503

Direct SQLite and persistent data, 273

directions, getting via Maps.app, 47-51

discrete gesture recognizers, 435

dispatch queues and GCD (Grand Central Dispatch), 357, 361

concurrent dispatch queues, 357-359

serial dispatch queues, 359-361

Document Provider Extensions, 238

duplexing (printing), 262-263

Dylan, Bob, 143

dynamic behavior and UIKit Dynamics, 2

Dynamic Link Detection and TextKit, 423-424

Dynamic Type and TextKit, 432

E

earned/unearned achievements (games), 98-99

embedded frameworks (extensions), creating, 243-244

entities, creating for managed object models in Core Data, 280

EOF (Enterprise Object Framework) and Core Data, 271

error codes (Keychain sample app), 372

error handling when printing, 264

events (Passbooks), 469, 471

exception breakpoints (debugging), 508

exclusion paths and TextKit, 425-426

expiration handlers and background-task processing, 337

extensions, 237, 247

Action Extensions, 238

API limitations, 239

Apple Watch Extensions, 244-247

creating, 240-241

Custom Keyboard Extensions, 238

Document Provider Extensions, 238

embedded frameworks, creating, 243-244

functionality of, 238-239

host apps, sharing information with, 243-244

Photo Editing Extensions, 238

Share Extensions, 238

Today Extensions, 237, 240, 242

WatchKit, 244-247

F

face detector (Core Image filters), 391

processing facial features, 392-394

setup, 391-392

Facebook and Social Framework, 305, 331

Facebook app, creating, 315-316

logins, 306-308

permissions

basic Facebook permissions, 317-318

publishing to stream permissions, 319-320

posting to

Facebook, 311, 315

streams, 320-321

SLComposeViewController, 308-310

SocialNetworking sample app, 305-306

user timelines, accessing, 322, 327-331

FavoritePlaces sample app

annotations, 28

adding, 28-31

custom views, 31-33

displaying, 31-33

draggable views, 34

standard views, 31-33

displaying maps, 25

coordinate systems, 25

Mercator Projection, 25

geocoding addresses, 36-40

geofencing (regional monitoring), 43

boundary definitions, 44-45

monitoring changes, 45-46

regional monitoring capability checks, 43-44

map view, 28

MKMapKit, configuring/customizing, 25-26

overlays, 28, 35-36

purpose of, 15

reverse-geocoding addresses, 36, 40-43

user interactions, responding to, 27-28

user location requests, 16

location services checks, 19

parsing location data, 22-23

permissions, 16-19

requirements, 16-19

significant location change notifications, 23

starting requests, 19-22

testing locations, 23-24

understanding data, 22-23

fetched results controller (Core Data), 292

filters (Core Image filters), 383

attributes of, 386-388

categories of, 383-386

chaining, 390-391

rendering filtered images, 389-390

fitness/health apps. See HealthKit

flow layouts (collection views), 395-396

customizing, 403-404

decoration views, 405-408

font settings (text), changing in TextKit, 432

foreground app, 333

formatting scores in Whack-a-Cac sample app, 65-66

frameworks (embedded), creating for extensions and host apps, 243-244

G

Game Center

achievements, 85, 87, 107

Achievement Challenges, 94-97

adding to iTunes Connect, 86

authenticating, 88

caching, 89-90

completion banners, 93

creating, 85-86

customizing, 105-107

displaying achievements, 87-88

earned/unearned achievements, 98-99

Hidden property, 87

hooks, 92-93

localization information, 87

multiple session achievements, 101-102

partially earned achievements, 99-100

piggybacked achievements, 102-103

Point Value attribute, 87

reporting, 90-92

resetting, 104-105

storing achievement precision, 102-103

timer-based achievements, 103-104

Whack-a-Cac sample app, 97-104

Game Center Manager, 66-68, 88

iTunes Connect

adding achievements to, 86

configuring Game Center behavior in, 63-64

leaderboards, 53, 83

Apple’s limit on number of leaderboards, 65

authenticating, 68-73

Combined Leaderboards, 64

configuring, 64-65

configuring behavior in iTunes Connect, 63-64

customizing leaderboard systems, 81-82

deleting, 64

formatting scores, 65-66

localization information, 66

presenting, 77-79

Single Leaderboards, 64

sort-order option, 66

scores

Game Center Challenges, 79-81

submitting, 73-76

sort-order option, 66

Whack-a-Cac sample app, 53-55, 63

achievement hooks, 92-93

achievements, 97-104

configuring leaderboards, 65

displaying life, 60-61

displaying score, 60

Game Center Manager and, 66-68

hooks (achievements), 92-93

interacting with cacti (cactus), 58-60

pausing games, 62

resuming games, 62

spawning cacti (cactus), 55-58

game developers and physics simulations, 3

GarageBand, custom sound and notifications, 208-209

GCD (Grand Central Dispatch) and performance, 345, 361

dispatch queues, 357, 361

concurrent dispatch queues, 357-359

serial dispatch queues, 359-361

LongRunningTasks sample app, 345-346

background-task processing, 349-351

running in operation queues, 351-357

running main threads, 347-349

operation queues, running in, 361

cancelling operations, 354-355

concurrent operations, 351-352

custom operations, 355-357

serial operations, 353-354

queues, 347

generic passes (Passbooks), 469, 471-472

geocoding addresses in Map apps, 36-40. See also reverse-geocoding in Map apps

geofencing (regional monitoring), 43

boundaries, defining, 44-45

monitoring

changes, 45-46

regional monitoring capability checks, 43-44

gesture recognizers, 435, 448

basic usage, 436

continuous gesture recognizers, 435

custom UIGestureRecognizer subclasses, 448

discrete gesture recognizers, 435

event sequence of a recognizer, 443-444

failures, requiring, 446-447

Gesture Playground sample app, 437

pinch gesture recognizers, 440-441

tap gesture recognizers, 438-440

multiple recognizers, using per view, 441-445

pinch gesture recognizers, 440-441

tap gesture recognizers, 436, 438-440

types of, 435

GPS (Global Positioning System) in Map apps, 22

GPX (GPS Exchange Format) files, testing locations in Map apps, 23-24

graphics. See image handling; photo library

gravity (physics simulations), 3-4

H

Handoff, 249, 257

advertisements, 249-251

configuring, 251-252

continuation, 250-251

document-based apps, implementing in, 255-257

HandOffNotes sample app, 249

implementing

configurations, 251-252

continuing user activity, 253-255

creating user activity, 252-253

document-based apps, 255-257

introduction to, 249-251

testing, 251

user activity

continuing, 253-255

creating, 252-253

Harvard University, 504

Health.app

Dashboard, 146

introduction to, 146

reading characteristic data, 152

HealthKit, 145, 160

framework guide website, 145

ICFFever sample app, 147

adding HealthKit to, 148-149

permission requests, 150

reading/writing data, 152-154

introduction to, 145-146

new projects, adding to, 148-149

permission requests, 149-151

privacy, 145-146

reading/writing data

basic data, 152-154

body temperature data, 155-160

characteristic data, 152

complex data, 155-160

WWDC 2014, 145

Hidden property (achievements), 87

highlighting (content specific) and TextKit, 427-431

hit detection and TextKit, 424-425

HomeKit, 161, 181

Accessories

Accessory Simulator tests, 179-180

configuring, 170-175

discovering, 162

first time setups, 162

action sets, 162, 178-179

actions, 178-179

scheduling, 181

triggers, 181

capability setup, 163-164

configuring, 162-179

data access, 162

developer account setup, 163

enabling, 162

Home Manager, 164-168

HomeNav sample app, 161

Accessory configuration, 171-175

adding homes to, 166-168

iCloud setup, 165-166

introduction to, 162

Rooms, 162, 168-169

Service Groups, 176-178

Services, 176-178

triggers, 181

Zones, 169-170

hooks (achievements), 92-93

Hopper, Grace Murray, 504

horizontal accuracy in Map apps, 22

HTML (rendered), printing, 268-269

I

ICFFever sample app, 147

adding HealthKit to, 148-149

permission requests, 150

reading/writing data

basic data, 152-154

body temperature data, 155-160

complex data, 155-160

iCloud

CloudKit, 217-218, 220, 222, 235

account setup, 217-219

assets, 222

containers, 220

creating records, 224-226

dashboard and data management, 233-235

databases, 221

enabling iCloud capabilities, 220

fetching records, 223

push notifications, 227

record identifiers, 222

record zones, 222

records, 221-222

saving records, 224-226

subscriptions to data changes, 227-228

updating records, 226

user discovery/management, 229-233

CloudTracker sample app, 218, 228

components of, 217

HandOffNotes sample app, 249

HomeKit setup, 165-166

Key-Value Storage, 272

Photo Stream, 464

image handling, 375-376, 394

Core Image filters, 383, 394

chaining filters, 390-391

face detector, 391-394

filter attributes, 386-388

filter categories, 383-386

initializing images, 388-389

rendering filtered images, 389-390

Image Picker, 379-382

ImagePlayground sample app, 375

images

displaying, 377-379

initializing (Core Image Filters), 388-389

instantiating, 376-377

rendering filtered images (Core Image Filters), 389-390

resizing, 382-383

photo library, 449

PhotoLibrary sample app, 449-450

Photos framework, 449-450

Instruments (Xcode), 510-511, 519

interface of, 511-514

Leaks instrument, 516-518

Time Profiler instrument, 514-516

iOS

background-task processing, 333

Continuity, 249

foreground app, 333

Handoff, 249

Message Board sample app, 184-189

provisioning profiles and push notification tests, 203-207

iPhones and music libraries, 127

item properties (physics simulations) and UIKit Dynamics, 11-13

iTunes Connect

achievements, adding to, 86

Game Center, configuring behavior in, 63-64

new apps, submitting to, 63

J

Jobs, Steve, 127

JSON (JavaScript Object Notation), 183, 193

benefits of, 183-184

Message Board sample app, 184

messages, posting, 189-191

parsing, 186-187

persistent data and, 273

servers, getting JSON from, 185

building requests, 185-186

displaying data, 187-189

inspecting responses, 186

parsing JSON, 186-187

servers, sending JSON to, 191-193

website, 184

K

keyboards and Custom Keyboard Extensions, 238

Keychain sample app, 363-364, 374

apps, sharing between, 370-371

attribute keys, 367

dictionaries, securing, 368-370

error codes, 372

items, resetting, 370

PIN, storing/retrieving, 366-367

setup, 365-366

updating, 363

keyed archives/coders and persistent data, 272

L

labels (Address Book), 115-116

latitude and longitude in Map apps, 22

geocoding addresses, 36-40

reverse-geocoding addresses, 36, 40-43

leaderboards, 53, 83

Apple’s limit on number of leaderboards, 65

authenticating, 68-73

Combined Leaderboards, 64

configuring, 64

deleting, 64

Game Center

authenticating leaderboards, 68-73

configuring behavior in iTunes Connect, 63-64

presenting leaderboards in, 77-79

score challenges, 79-81

submitting scores to, 73-76

leaderboard systems, customizing, 81-82

localization information, 66

scores

formatting, 65-66

score challenges, 79-81

submitting to Game Center, 73-76

Single Leaderboards, 64-65

sorting, 66

Leaks instrument, 516-518

life, displaying in Whack-a-Cac sample app, 60-61

links, Dynamic Link Detection and TextKit, 423-424

local notifications, 195-196, 216

custom sound setup, 208-209

scheduling, 211-212

testing, 212

localization information

achievements, 87

leaderboards, 66

locations (maps), 15

annotations, 28

adding, 28-31

custom views, 31-33

displaying, 31-33

draggable views, 34

standard views, 31-33

Apple Maps, 15

Core Location, 15

importing, 16

user location requests, 16-24

geocoding addresses, 36-40

geofencing (regional monitoring), 43

boundary definitions, 44-45

monitoring changes, 45-46

regional monitoring capability checks, 43-44

GPS, 22

horizontal accuracy, 22

latitude and longitude, 22

map view, 28

MapKit, 15

displaying maps, 25-28

importing, 16

Maps.app, getting directions, 47-51

overlays, 28, 35-36

reverse-geocoding addresses, 36, 40-43

testing, 23-24

logging into Social Framework, 306-308

longitude and latitude in Map apps, 22

geocoding addresses, 36-40

reverse-geocoding addresses, 36, 40-43

LongRunningTasks sample app, 345-346

background-task processing, 349-351

custom operations, 355-357

main thread, running, 347-349

operation queues, running in, 351

cancelling operations, 354-355

concurrent operations, 351-352

serial operations, 353-354

M

manifests (passes), 488

MapKit, 15

annotations, 28

adding, 28-31

custom views, 31-33

displaying, 31-33

draggable views, 34

standard views, 31-33

displaying maps, 25

coordinate systems, 25

Mercator Projection, 25

geocoding addresses, 36-40

importing, 16

map view, 28

MKMapKit, configuring/customizing, 25-26

overlays, 28, 35-36

reverse-geocoding addresses, 36, 40-43

user interactions, responding to, 27-28

maps, 15

annotations, 28

adding, 28-31

custom views, 31-33

displaying, 31-33

draggable views, 34

standard views, 31-33

Apple Maps, 15

Core Location, 15

importing, 16

user location requests, 16-24

geocoding addresses, 36-40

geofencing (regional monitoring), 43

boundary definitions, 44-45

monitoring changes, 45-46

regional monitoring capability checks, 43-44

GPS, 22

horizontal accuracy, 22

latitude and longitude, 22

map view, 28

MapKit

displaying maps, 25-28

importing, 16

Maps.app, getting directions, 47-51

overlays, 28, 35-36

reverse-geocoding addresses, 36, 40-43

testing locations, 23-24

Mark II Aiken Relay Calculator, 504

Media Picker feature (music libraries), 138-141

memory management and NARC (New, Allow, Retain, Copy), 113-114

Mercator Projection in Map apps, 25

Message Board sample app, 184

MobileMe, 217

multiple session achievements (games), 101-102

multitasking and background-task processing, 335

music, playing in a background, 340-342

music libraries, 127, 144

Media Picker, 138-141

playback engines, 129

handling state changes, 132-137

playback duration, 137-138

registering notifications, 129-130

repeat feature, 138

shuffle feature, 138

timers, 137-138

user controls, 131-132

Player sample app, 127-128

handling state changes, 132-137

playback duration, 137-138

repeat feature, 138

shuffle feature, 138

timers, 137-138

user controls, 131-132

Programmatic Picker, 141

playing random songs, 141-142

predicate song matching, 142-143

MyMovies sample app, 273

displaying object data, 288-290

friend chooser, 285-287

movie display view, 287

movie list view controller, 292-299

predicates, 290-291

Shared Movies tab, 291

N

NARC (New, Allow, Retain, Copy) and memory management, 113-114

NeXT EOF (Enterprise Object Framework) and Core Data, 271

notifications, 195

APN, 195-196, 216

Apple documentation, 214

feedback, 215

CloudTracker sample app, 228

custom sound setup, 208-209

local notifications, 195-196, 216

custom sound setup, 208-209

scheduling, 211-212

testing, 212

push notifications, 195-196, 216

APN, 195-196, 200, 214

App ID, 196-199

app setup, 196-199

CloudKit, 227

custom sound setup, 208-209

development provisioning profiles, 203-207

Development Push SSL Certificates, 200-203

iOS provisioning profiles, 203-207

sending, 214-215

servers, 213-214

testing, 203-207, 212

receiving, 212-213

registering for, 209-211

ShoutOut sample app, 196

receiving push notifications, 215

registering for notifications, 209-211

NSDictionaries, 367

NSLayoutManager (TextKit), 420-421

NSLayoutManagerDelegate, 423

NSTextContainer, 423

NSTextStore, 421

NSUserDefaults and persistent data, 272

O

object databases. See Core Data

operation queues and GCD (Grand Central Dispatch), 351, 361

cancelling operations, 354-355

concurrent operations, running, 351-352

custom operations, 355-357

serial operations, 353-354

OS X Yosemite

Continuity, 249

Handoff, 249-250

overlays in Map apps, 28, 35-36

P

page ranges, setting for printing, 263-264

parsing JSON, 186-187

partially earned achievements (games), 99-100

Passbook, 467, 502

Pass Test sample app, 468

passes

adding, 494-497

app interactions, 491-494

barcode information, 477

boarding passes, 469

building, 474-481

coupons, 469-471

customizing appearance of, 468-478

designing, 468-474

events, 469, 471

fields, 478-481

generic passes, 469, 471-472

identification, 476

manifests, 488

packaging, 489

Pass Type ID, 481-483

presenting, 473-474

removing, 500-501

relevance, 476-477

showing, 499

signing, 489

signing certificates, 483-488

simulating updates, 497-499

store cards, 469, 472-473

testing, 489-490

types of, 469

updating, 497-499, 501

PassKit, 467, 502

password security. See security

pausing games, Whack-a-Cac sample app, 62

PDF (Portable Document Format), printing, 269-270

People Picker (Address Book), 118-120

contacts

creating, 122-125

editing, 120-121

viewing, 120-121

customizing, 120

performance and GCD (Grand Central Dispatch), 345, 361

dispatch queues, 357, 361

concurrent dispatch queues, 357-359

serial dispatch queues, 359-361

LongRunningTasks sample app, 345-346

running in operation queues, 351-357

running main threads, 347-349

operation queues, running in, 361

cancelling operations, 354-355

concurrent operations, 351-352

custom operations, 355-357

serial operations, 353-354

queues, 347

permissions

HealthKit permission requests, 150

photo library, 451-453

persistent data

coders/keyed archives, 272

Core Data, 271-273, 299, 303

adding managed objects, 299-300

building managed object models, 278-282

default data setup, 282-284

displaying managed objects, 285-291

editing managed objects, 301

environment of, 275-278

EOF and, 271

features of, 271

fetched results controller, 292-299

MyMovies sample app, 273

removing managed objects, 300-301

rolling back changes to managed objects, 301-303

saving changes to managed objects, 301-303

SQLite, 271

starting projects, 274-278

CSV, 273

Direct SQLite, 273

iCloud Key-Value Storage, 272

JSON, 273

MyMovies sample app, 273

displaying object data, 288-290

friend chooser, 285-287

movie display view, 287

movie list view controller, 292-299

predicates, 290-291

Shared Movies tab, 291

NSUserDefaults, 272

plist (Property List), 272

structured text files, 273

Photo Editing Extensions, 238

photo library, 449, 451, 459, 465

asset collections, 453-457, 459-461

assets, 457-458, 462-464

permissions, 451-453

Photo Stream, 464

PhotoLibrary sample app, 449-450

Photos framework, 449-450

PHAsset, 450

PHAssetCollection, 450

PHFetchResult, 450

PHImageManager, 450

PHPhotoLibrary, 450

PhotoGallery sample app, 395-396

physics simulators and UIKit Dynamics, 1, 3, 14

attachments, 7-8

classes of, 2

collisions, 3-6

dynamic behavior, 2

gravity, 3-4

introduction to, 2

item properties, 11-13

push forces, 10-11

sample app, 1

snaps, 9

springs, 8-9

UIAttachmentBehavior class, 2

UICollisionBehavior class, 2

UIDynamicAnimator, 2-3, 13

UIDynamicAnimatorDelegate, 13

UIDynamicItem protocol, 1, 12

UIDynamicItemBehavior class, 2

UIGravityBehavior class, 2

UIPushBehavior class, 2

UISnapBehavior class, 2

pictures. See image handling; photo library

piggybacked achievements (games), 102-103

pinch gesture recognizers, 440-441

playback engines

playback duration, 137-138

repeat feature, 138

shuffle feature, 138

state changes, handling, 132-137

timers, 137-138

user controls, 131-132

playback engines (music libraries), 129-130

Player sample app (music libraries), 127-128

playback duration, 137-138

repeat feature, 138

shuffle feature, 138

state changes, handling, 132-137

timers, 137-138

user controls, 131-132

plist (Property List) and persistent data, 272

Point Value attribute (achievements), 87

predicates, displaying managed objects in Core Data, 290-291

printing

AirPrint, 259, 270

error handling, 264

page ranges, 263-264

Print Center app, 266-267

printer compatibility, 259

Printer Simulator tool, 259, 265

printing PDF, 269-270

printing rendered HTML, 268-269

printing text, 261-265

starting jobs, 264-265

testing, 259, 261

UIPrintInteractionController-Delegate, 267

duplexing, 262-263

Print Center app, 266-267

Print sample app, 260

Printopia, 259

privacy

Address Book, 110

HealthKit, 145-146

Programmatic Picker feature (music libraries), 141, 144

predicate song matching, 142-143

random songs, playing, 141-142

properties of items (physics simulations) and UIKit Dynamics, 11-13

Property List (plist) and persistent data, 272

protecting data

Keychain sample app, 363-364, 374

attribute keys, 367

error codes, 372

resetting items, 370

securing dictionaries, 368-370

setup, 365-366

sharing between apps, 370-371

storing/retrieving PIN, 366-367

updating, 363

Touch ID, 374

error codes, 373

implementing, 372-373

push forces (physics simulations) and UIKit Dynamics, 10-11

push notifications, 195-196, 216

APN, 195-196

Apple documentation, 214

Development Push SSL Certificates, 200

App ID, 196-199

app setup, 196-199

CloudKit, 227

custom sound setup, 208-209

development provisioning profiles, 203-207

Development Push SSL Certificates, 200-203

iOS provisioning profiles, 203-207

sending, 214-215

servers, 213-214

testing, 203-207, 212

Q

queues and GCD (Grand Central Dispatch), 347

dispatch queues, 357, 361

concurrent dispatch queues, 357-359

serial dispatch queues, 359-361

operation queues, running in, 351, 361

R

receiving notifications, 212-213

record identifiers (CloudKit), 222

record zones (CloudKit), 222

records (CloudKit), 221-222

creating, 224-226

fetching, 223

saving, 224-226

updating, 226

regional monitoring. See geofencing

relationships, establishing in managed object models in Core Data, 281

remote notifications. See push notifications

rendered HTML, printing, 268-269

repeat feature (playback engines), 138

reporting achievements (games), 90-92

resetting achievements (games), 104-105

resizing images, 382-383

resuming (pausing) games, Whack-a-Cac sample app, 62

reverse-geocoding addresses in Map apps, 36, 40-43. See also geocoding addresses in Map apps

Rooms (HomeKit), 162, 168-169

Ruby on Rails and Message Board sample app, 184

JSON, encoding, 189-191

server access, 184

S

saving records (CloudKit), 224-226

scheduling

actions (HomeKit), 181

local notifications, 211-212

scores

Game Center

customizing leaderboard systems, 81-82

score challenges, 79-81

submitting to, 73-76

Whack-a-Cac sample app

adding scores to, 76-77

displaying, 60

formatting, 65-66

security

Keychain sample app, 363-364, 374

attribute keys, 367

error codes, 372

resetting items, 370

securing dictionaries, 368-370

setup, 365-366

sharing between apps, 370-371

storing/retrieving PIN, 366-367

updating, 363

Touch ID, 374

error codes, 373

implementing, 372-373

serial operations, running, 353-354

Service Groups (HomeKit), 176-178

Services (HomeKit), 176-178

Share Extensions, 238

Shared Movies tab (MyMovies sample app), 291

sharing information betwen host apps and extensions, 243-244

ShoutOut sample app, 196

notifications, registering for, 209-211

push notifications, receiving, 215

shuffle feature (playback engines), 138

Sina Weibo and Social Framework, 305

Single Leaderboards, 64-65

sizing images, 382-383

SLComposeViewController, 308-310

snaps (physics simulations) and UIKit Dynamics, 9

Social Framework, 305, 331

logins, 306-308

posting to

Facebook, 311, 315-321

Twitter, 311

SLComposeViewController, 308-310

SocialNetworking sample app, 305-306

user timelines, accessing

Facebook timelines, 322, 327-331

Twitter timelines, 322-327

songs in Programmatic Picker (music libraries)

predicate song matching, 142-143

random songs, playing, 141-142

sort-order option (Game Center), 66

sound (custom) and notifications, 208-209

springs (physics simulations) and UIKit Dynamics, 8-9

SpriteKit, 2

SQLite

Core Data and, 271

Direct SQLite and persistent data, 273

SSL (Secure Socket Layer) and Development Push SSL Certificates, 200-203

store cards (Passbooks), 469, 472-473

storing

achievement precision (games), 102-103

iCloud Key-Value Storage and persistent data, 272

PIN in Keychain sample app, 366-367

street addresses, handling in Address Book, 116-117

structured text files and persistent data, 273

subclasses, customized in managed object models in Core Data, 282

submitting

new apps to iTunes Connect, 63

scores to Game Center, 73-76

subscribing to data changes in CloudKit, 227-228

symbolic breakpoints (debugging), 508

T

tap gesture recognizers, 436, 438-440

temperature (body), reading/writing data in HealthKit, 155-160

testing

Accessory Simulator tests (HomeKit), 179-180

AirPrint, 259, 261

Handoff, 251

local notifications, 212

passes (Passbook), 489-490

push notifications, 203-207

text

AirPrint, printing text via, 261-262

configuring print info, 262-263

duplexing, 262-263

error handling, 264

page ranges, 263-264

Printer Simulator tool, 265

starting print jobs, 264-265

Core Text, 419

TextKit, 419, 433

changing font settings (text), 432

content specific highlighting, 427-431

Dynamic Link Detection, 423-424

Dynamic Type, 432

exclusion paths, 425-426

hit detection, 424-425

NSLayoutManager, 420-423

sample app, 420

Time Profiler instrument, 514-516

timers

playback engines, 137-138

timer-based achievements (games), 103-104

Today Extensions, 237, 240, 242

Touch ID, 374

error codes, 373

implementing, 372-373

triggers (HomeKit), 181

Twitter and Social Framework, 305, 331

logins, 306-308

posting to Twitter, 311-315

SLComposeViewController, 308-310

SocialNetworking sample app, 305-306

user timelines, accessing, 322-327

U

UIAttachmentBehavior class, 2

UICollisionBehavior class, 2

UIDynamicAnimator, 2, 13

creating, 3

multiple instances of, 3

UIDynamicAnimatorDelegate, 13

UIDynamicItem protocol, 1, 12

UIDynamicItemBehavior class, 2

UIGravityBehavior class, 2

UIKit Dynamics, 1, 14

attachments, 7-8

classes of, 2

collisions, 3-6

dynamic behavior, 2

gravity, 3-4

introduction to, 2

item properties, 11-13

push forces, 10-11

sample app, 1

snaps, 9

springs, 8-9

UIAttachmentBehavior class, 2

UICollisionBehavior class, 2

UIDynamicAnimator, 2, 13

creating, 3

multiple instances of, 3

UIDynamicAnimatorDelegate, 13

UIDynamicItem protocol, 1, 12

UIDynamicItemBehavior class, 2

UIGravityBehavior class, 2

UIPushBehavior class, 2

UISnapBehavior class, 2

UIPrintInteractionControllerDelegate, 267

UIPushBehavior class, 2

UISnapBehavior class, 2

unearned/earned achievements (games), 98-99

updating

passes (Passbook), 497-499, 501

records (CloudKit), 226

UTI (Uniform Type Indicators), Handoff and document-based app implementations, 256

V - W

WatchKit, 244-247

Whack-a-Cac sample app, 53-55, 63

achievements, 97-98

earned/unearned achievements, 98-99

hooks, 92-93

multiple session achievements, 101-102

partially earned achievements, 99-100

piggybacked achievements, 102-103

storing achievement precision, 102-103

timer-based achievements, 103-104

cacti (cactus)

interaction with, 58-60

spawning, 55-58

Game Center Manager and, 66-68

leaderboards, configuring, 65

life, displaying, 60-61

pausing games, 62

resuming games, 62

score, displaying, 60

scores, submitting, 76-77

WWDC 2014 and HealthKit, 145

X

Xcode

background-task processing

executing tasks, 335-336

types of background activities, 339-340

CloudKit

account setup, 217-219

enabling iCloud capabilities, 220

Core Data

building managed object models, 278-282

fetched results controller, 292-299

starting projects, 274-278

debugging, 504-505, 509-520

HomeKit

capability setup, 163-164

developer account setup, 163

Instruments, 510-511, 519

interface of, 511-514

Leaks instrument, 516-518

Time Profiler instrument, 514-516

testing locations in Map apps, 23-24

Y

Yosemite (OS X)

Continuity, 249

Handoff, 249-250

Z

Zones (HomeKit), 169-170

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

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