Action buttons
in notifications, generally, 219–220
in notifications, handling, 220–225
Actions
segues in, 24
Alerts. See also Notifications, 68–72
Application Context for, 162–163
creating apps in, generally, 7
development tools for, 2
File Transfer for, 164
hardware in. See Hardware, Apple Watch
Hello, World! app in. See Hello, World! app
Interface Controller in. See Interface Controller
live communications in, 165
Send Message mode in, 165
Simulator in. See Apple Watch Simulator
types of apps in, 6
user interfaces in. See User interfaces (UI)
WatchKit architecture and, 3–4
animation in, 80
background images in, 74
display of Current page in, 41–42
emojis in, 110
Glance scenes in, 244
hierarchical navigation in, 25–26, 32
images next to text in, 89
interactive messaging in, 182–183
menu items in, adding programmatically, 122–123
navigation using code in, 36, 38
notifications in, 210
page-based navigation in, 26–27, 33
passing data between Interface Controllers in, 32–33
Picker controls in, 92, 94–97, 100
selecting items in tables in, 90
Table controls in, 86
text input in, 108
Watch Connectivity Framework in, 171, 174
writing data to files in, 201–202
background transfers in, 162–163
comparing to other modes, 184
introduction to, 162
sending data in iOS app, 169–170
sending data in WatchKit Extension, 167–169
on Simulators, 171
testing applications in, 171
Application tests. See Testing applications
Assets.xcassets files
animation in, 78
background images in, 60, 74–75
control knobs in, 99
images next to text in, 86
Picker displaying images in, 93
playing movies in, 104
poster images in, 105
Attributes Inspector, 24–25, 240–243
awakeWithContext
method
in display of Current page, 41–42
for Glance scenes, 240
in Interface Controller, 20–21
in ReturningValues project, 45–47
Background action buttons, 206
Background images
in Interface Controller, 74–75
Background transfers
in Application Context, 162–163
comparison of communication modes for, 184
in File Transfer, 164
in Watch Connectivity Framework, 162–164
Bluetooth LE (Low Energy) connections, 3
Bundles, 3
adding to Interface Controller, 50–51
for background actions, 206
background images and, 60–62, 74
displaying attributed strings in, 54–55
for foreground actions, 206
introduction to, 50
for making phone calls, 125–127
for notification actions, 219–225
Cancellations
in Interface Controller, 33–34
in Watch Connectivity Framework, 179–180
Circular Small complications
in Movie Showtime project, 153, 156, 158
support for, 143
CLKComplicationDataSource
protocol, 138–139, 143
ClockKit Framework
placement of complications in, 139–140
template classes in, 140
Code Editor
navigation using, 35
returning data with, 44
Communications
Application Context mode of. See Application Context
comparison of modes of, 184
File Transfer mode of. See File Transfer
live, 165
User Info mode of. See User Info
in Watch Connectivity Framework, generally, 162–165, 184
in WatchKit Extension, 175
Complications
ClockKit Framework for, 138–140
families of, 143
Movie Showtime project example of. See Movie Showtime project
placeholder templates for, 143–149
refresh frequency in, 159
summary of, 159
template classes for, 140
Connectivity
Web services, accessing, 194–198
Containing iOS Apps. See also iOS Apps, 3, 10
Controllers
Static Interface. See Static Interface Controller
View. See View Controller
WKInterfaceController
class for, 12
Controls
Button. See Button controls
Image. See Image controls
Label. See Label controls
Movie, 73
Picker. See Picker controls
in user interfaces. See User interfaces (UI)
Cook, Tim, 1
Data
passing between Interface Controllers, 27–33
returning from Interface Controllers, 42–48
sending. See Sending data
Delegation design patterns, 42
Deploying Apple Watch apps, 4–5
Development tools, 2
didActivate
method
in display of Current page, 40
for Glance scenes, 240
in Label controls, 31
Digital Crown
Apple Watch hardware and, 130–131
introduction to, 2
Picker controls in, 90, 92, 97
dismissController
method, 36
Displaying information. See also Displays
Force Touch for, adding items programatically, 121–123
Force Touch for, context menus in, 115–121
Force Touch for, generally, 111–115
Image controls for, animations in, 78–80
Image controls for, generally, 74, 76–78
introduction to, 73
Label controls for, generally, 73
laying out controls for, 111–115
movies, playing programatically, 101–103
Picker controls for, captions in, 96–97
Picker controls for, control knobs in, 97–100
Picker controls for, displaying images in, 93–94
Picker controls for, generally, 90
Picker controls for, lists of text in, 91–93
Picker controls for, scrolling style in, 94–96
summary of, 123
Table controls for, adding Image controls to, 87–89
Table controls for, generally, 80–86
Table controls for, selecting items in, 89–90
Display Screen buttons for, 26–27
of Glance scenes. See Glance scenes
of information. See Displaying information
of Interface Controller pages, 37–38
of notifications. See User Info
Dynamic Interface Controller, 210, 216
background transfers in, 164
canceling outstanding transfers in, 179–180
comparison to other communication modes, 184
introduction to, 162
sending data/files in iOS app, 177–179
sending data/files in WatchKit Extension, 175–177
testing applications in, 179
Force Touch
context menus, adding items programmatically, 121–123
context menus for, generally, 115–121
Foreground action buttons, 206
summary of, 123
Glance Interface Controller, 238–243, 249–252
summary of, 252
testing, 244
usefulness of, 244
introduction to, 125
Hierarchical navigation
between Interface Controllers, 22–26
using code for, 36
Identifier attributes, 43
text next to images and, 86–89
Include Notification Scene, 209
Information
displaying. See Displaying information
gathering. See Gathering information
Interactive Messaging
comparison to other communication modes, 184
testing applications in, 182–183
in Watch Connectivity Framework, 180–183
in WatchKit Extension, 180–181
Button controls in, 50–51, 91–93
designating specific pages to display in, 39–42
displaying series of pages in, 37–38
hierarchical navigation in, 22–26
interactive messaging in, 180–181
menu items in, adding programmatically, 121–123
modification of, 13
navigating between, generally, 22–27
notifications in, 210
Picker controls in. See Picker controls
selecting items in tables in, 89–90
Storyboard Editor and. See Storyboard Editor
summary of, 48
Watch Connectivity Framework in, 167–169
Interface.storyboard file, defined. See also Storyboard Editor, 10
Application Context in, 169–170
Interactive Messaging in, 181–182
interfacing with, generally. See Watch Connectivity Framework
sending data in, 169–174, 177–179
Watch Connectivity Framework for. See Watch Connectivity Framework
Apple Watch interacting with, 5–6
Application Context for, 162–163
File Transfer for, 164
live communications in, 165
Send Message mode in, 165
simulation of. See iPhone Simulator
View Controller for, 22
DisplayingGlances project in, 249
interactive messaging in, 182–183
notifications in, 211, 213–218
unlocking, 22
Watch Connectivity Framework in, 171, 174
writing data to files in, 201–202
Jobs, Steve
on change, 161
on creating for oneself, 237
on design as function, 1
on ease of use, 125
on innovation, 73
on leading via innovation, 73
on limitation of focus groups, 17
on mistakes, 137
on quality of choices, 49
for displaying information, 73
Live communications, 165
Local notifications, 205–208, 220
Locations
in ReturningValues project, 45–48
Long-look interfaces
handling notifications with, 225–230
naming notifications in, 215–216
Low Energy (Bluetooth LE) connections, 3
Lower group in Glance Interface Controller, 240–243
Menu Item controls
adding programmatically, 121–123
Messages, sending. See Sending messages
Modular Small/Large complications
changing complications to, 147–149
in Movie Showtime project, 152, 155–157
placeholder templates for, 144–145
support for, 143
complication families supported by, 143
complication placeholder template in, 143–149
introduction to, 141
refresh frequencies in, 159
Movies
Movie Showtime project for. See Movie Showtime project
playing programmatically, 101–103
refreshing, 159
NavigateUsingCode project, 35
Navigation
between Interface Controllers, 22–27
Label controls and, 25
action buttons in, generally, 219–220
action buttons in, handling, 220–225
displaying, generally, 205
icons for Apple Watch apps and, 215–217
introduction to, 6
long-look interface for, 225–230
modifying WatchKit app names for, 214–215
short-look interfaces for, 209–212
simulation of payloads for, 230–234
summary of, 235
NSNotificationCenter
, 42
NSUserDefaults
class
Glance scenes and, 245
Page-based navigation
between Interface Controllers, 26
introduction to, 22
using code in, 36
Passing data between Interface Controllers, 27–33
Phone calls. See also iPhone apps, 125–127
in Digital Crown, 131
displaying information with, 73, 90
returning data with, 43, 45–48
popController
method, 36
presentControllerWithName:context:
method, 36, 38
Push segues, 24
pushControllerWithName:context:
method, 36
PushNotificationPayload.apns file, 210–213, 219
Refresh frequencies, 159
Remote notifications
action buttons for, 220
requestLocation
method, 185–188
Returning data from Interface Controllers, 42–48
ReturningValues project, 42
Saving data
NSUserDefaults
class in, 202
Scrolling, 130
SecondInterfaceController.swift file, 39–42, 43
via Application Context, 167–171
in WatchKit Extension, 167–169, 172–173, 175–177
in iPhones, 165
in Watch Connectivity Framework, 180–181
Short-look interfaces, 209–212, 215–216
Simulation
in Apple Watch. See Apple Watch Simulator
in iPhones. See iPhone Simulator
Smartwatches. See Apple Watch
Specifications of Apple Watch, 1–2
action buttons in, 220
customizing notifications in, 212–214
displaying notifications in, generally, 210–212
icons for Apple Watch app in, 216–217
naming notifications in, 214–215
accelerometers in, 131
action sheets in, 68
alerts in, 68
background images in, 75
context menus in, 116
control layout in, 111
hierarchical navigation in, 23
Interface.storyboard file in, generally, 10
lists of text in, 91
navigation using code in, 35
notifications in, 210
passing data between Interface Controllers in, 29
playing movies programatically, 101
recording audio in, 127
saving data in, 198
Slider controls in, 65
Table controls in, generally, 80
Table Row Controller in, 83, 88
Taptic Engine in, 134
text inputs in, 106
Web services in, 194
Strings
saving to files, 199
Swift class
in Interface Controller, 17–22
Table controls
Taptic Engine
Apple Watch hardware and, 134–136
introduction to, 2
Templates
in ClockKit Framework, 140
for complications, 140, 143–149
WatchKit Class, 28
in Application Context, 170–171
in File Transfer, 179
Glance scenes, 244
for interactive messaging, 182–183
in User Info, 174
Text
ThirdInterfaceController.swift file, 39–42
UI (User interfaces). See User interfaces (UI)
Updating Glance scenes, 249–252
Upper group in Glance Interface Controller, 240–242
background transfers in, 163–164
canceling outstanding transfers in, 179–180
comparison to other communication modes, 184
introduction to, 162
sending data in iOS Apps, 173–174
sending data in WatchKit Extension, 172–173
testing applications in, 174
adding Button controls to Interface Controller, 50–51
Button controls in, generally, 50
displaying attributed strings in, 54–55
introduction to, 49
tap gestures and, generally, 49–50
Utilitarian Small/Large complications
in Movie Showtime project, 152–153, 156, 158
Vibrator function, 134
View Controller. See also Views
Application Context in, 169–170
interactive messaging in, 181–182
on iPhones, generally, 22
User information in, 166
Watch Connectivity Framework in, 166, 169–170
defined, 49
background transfers in, 162–164
cancelling outstanding transfers in, 179–180
communication types in, 162–165, 184
comparison of modes in, 183–184
Interactive Messaging in, 180–183
live communications in, 165
sending data/files via File Transfer, 174–179
sending data via Application Context, 167–171
sending data via User Info, 172–174
testing applications in, 170–171, 174, 179
WatchKit. See also specific functions
Class template, 28
deploying Apple Watch apps and, 4–5
displaying information in, generally, 73
Extension. See WatchKit Extension
Interface Controller in. See Interface Controller
iOS Apps in. See iOS Apps
iPhone apps in. See iPhone apps
storyboards in. See Storyboard Editor
summary of, 15
ExtensionDelegate
class in, 12–13
Interactive Messaging in, 180–181
UINavigations project in, 27–33
WatchOS operating system, 1, 3–4
willActivate
method
in display of Current page, 40
for Glance scenes, 240
in Interface Controller, 20–21
in Label controls, 31
WKInterfaceController
class, 12
World Wide Developers Conference (WWDC2015), 1
Writing data to files, 199–201
WWDC2015 (World Wide Developers Conference), 1
Xcode 7
AudioRecord project in, 127
Buttons in, 50
Communications in, 165, 171, 174
complication placeholder template in, 145
custom fonts in, 55
DisplayingGlances project in, 238, 245, 249
FileStorage project in, 198, 201–202
ForceTouch project in, 115
Images in, 74
introduction to, 2
Layouts in, 111
Movie Showtime project in, 141
Movies in, 101
NavigationUsingCode project in, 35
Notifications in, 209, 211, 221
phone calls in, 125
ReturningValues project in, 42
simulators and, generally, 13–14
Sliders in, 65
Switches in, 62
Tables in, 80
Taptic Engine in, 134
TextInputs project in, 106
UINavigations project in, 23
UsingAlerts project in, 68
UsingCoreMotion project in, 131
UsingLocation project in, 185, 188, 193
UsingPicker project in, 91
3.147.126.211