Statistics
5
Views
0
Downloads
0
Donations
Support
Share
Uploader

高宏飞

Shared on 2026-05-21

AuthorScott Grosch

Since the Apple Watch came out in 2015, step by step it has been making a dominan position in the market, becoming an indispensable complement for many users. It has proven to be a tremendously useful device with which you can see all your notifications without having to take out the phone, or check valuable information from your favorite apps at a glance. It has even become the perfect companion for those who like practicing all sort of sports. This book will teach you how to make the most of it. Implementing all the functionalities and capabilities this small device you wear on your wrist provides. From showing notifications to how to use snapshots to provide updated information. Or why complications are so important. Even how to integrate HealthKit into your apps! As well as many other concepts that we encourage you to discover by reading this book. All this using SwiftUI, the declarative framework to build applications designed by Apple. You will see how easy it is to build incredible applications for your Watch. We hope you enjoy this book almost as much as we have enjoyed creating it. We can’t wait to see what you’re going to build after reading it!

Tags
No tags
Publisher: Razeware LLC.
Publish Year: 2021
Language: 英文
Pages: 265
File Format: PDF
File Size: 22.3 MB
Support Statistics
¥.00 · 0times
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

(This page has no text content)
watchOS With SwiftUI by Tutorials Scott Grosch Copyright ©2021 Razeware LLC. Notice of Rights All rights reserved. No part of this book or corresponding materials (such as text, images, or source code) may be reproduced or distributed by any means without prior written permission of the copyright owner. Notice of Liability This book and all corresponding materials (such as source code) are provided on an “as is” basis, without warranty of any kind, express of implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in action of contract, tort or otherwise, arising from, out of or in connection with the software or the use of other dealing in the software. Trademarks All trademarks and registered trademarks appearing in this book are the property of their own respective owners. watchOS With SwiftUI by Tutorials watchOS With SwiftUI by Tutorials raywenderlich.com 2
Table of Contents: Overview Book License 9................................................................................................ Before You Begin 10................................................................ What You Need 11........................................................................................ Book Source Code & Forums 12............................................................. Introduction 16.............................................................................................. Section I 18................................................................................. Chapter 1: Hello, Apple Watch 19.............................................. Chapter 2: Project Structure 26................................................. Chapter 3: Digital Crown 35......................................................... Chapter 4: Watch Connectivity 44............................................ Chapter 5: Snapshots 73................................................................ Chapter 6: Notifications 96.......................................................... Chapter 7: Lifecycle 115................................................................ Chapter 8: Introduction to Complications 132..................... Chapter 9: Complications 151..................................................... Chapter 10: Keeping Complications Updated 169............. Chapter 11: Tinted Complications 186.................................... Chapter 12: SwiftUI Complications 197.................................. Chapter 13: Face Sharing 212..................................................... Chapter 14: Sign in With Apple 228.......................................... Chapter 15: HealthKit 238............................................................ watchOS With SwiftUI by Tutorials raywenderlich.com 3
Conclusion 265.............................................................................................. watchOS With SwiftUI by Tutorials raywenderlich.com 4
Table of Contents: Extended Book License 9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Before You Begin 10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What You Need 11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Book Source Code & Forums 12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About the Author 14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About the Editors 14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Introduction 16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How to read this book 17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Section I 18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 1: Hello, Apple Watch 19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hello, World! 20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . It’s just SwiftUI 21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sprucing things up 22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . But… watchOS code? 25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key points 25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 2: Project Structure 26. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Naming your app 31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . App vs. extension folders 33. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding Apple Watch support later 34. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key points 34. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 3: Digital Crown 35. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pong 40. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key points 43. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 4: Watch Connectivity 44. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Device-to-device communication 45. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . watchOS With SwiftUI by Tutorials raywenderlich.com 5
Getting started 48. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting up watch connectivity 51. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key points 72. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where to go from here? 72. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 5: Snapshots 73. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Getting started 74. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Dock 74. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Snapshot API 75. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Working with snapshots 78. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key points 95. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where to go from here? 95. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 6: Notifications 96. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where did it go? 97. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Short looks 98. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Long looks 98. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Local notifications 99. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Remote push notifications 106. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key points 114. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where to go from here? 114. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 7: Lifecycle 115. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Common state transitions 116. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Always on state 121. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . State change sample 121. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Extended runtime sessions 122. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key points 131. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where to go from here? 131. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 8: Introduction to Complications 132. . . . . . . . . . . . . . . . . Why complications? 133. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Complication families 135. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Complication identifiers 135. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . watchOS With SwiftUI by Tutorials raywenderlich.com 6
Complication templates 135. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tinted complications 149. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key points 150. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where to go from here? 150. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 9: Complications 151. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Exploring the sample 151. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Complication data source 152. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Updating the complication’s data 158. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supporting multiple families 160. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Freshness 167. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key points 168. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where to go from here? 168. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 10: Keeping Complications Updated 169. . . . . . . . . . . . . . Scheduled background tasks 170. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Background URL downloads 174. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Push notifications 181. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key points 185. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 11: Tinted Complications 186. . . . . . . . . . . . . . . . . . . . . . . . . Full-color 186. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Desaturation 189. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Layered images 189. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SwiftUI complications 191. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key points 196. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where to go from here? 196. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 12: SwiftUI Complications 197. . . . . . . . . . . . . . . . . . . . . . . . Showing an appointment 198. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The event complication 205. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tinting 210. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key points 211. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where to go from here? 211. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . watchOS With SwiftUI by Tutorials raywenderlich.com 7
Chapter 13: Face Sharing 212. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sharing faces 213. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key points 227. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where to go from here? 227. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 14: Sign in With Apple 228. . . . . . . . . . . . . . . . . . . . . . . . . . . . . To authenticate or not 229. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Authenticate via username and password 229. . . . . . . . . . . . . . . . . . . . . . . . . . Handling sign in 230. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Signing in with Apple 232. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key points 237. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where to go from here? 237. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 15: HealthKit 238. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding HealthKit 239. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tracking brushing 243. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tracking water 247. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reading single day data 254. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reading multiple days of data 260. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key points 264. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusion 265. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . watchOS With SwiftUI by Tutorials raywenderlich.com 8
LBook License By purchasing watchOS With SwiftUI by Tutorials, you have the following license: • You are allowed to use and/or modify the source code in watchOS With SwiftUI by Tutorials in as many apps as you want, with no attribution required. • You are allowed to use and/or modify all art, images and designs that are included in watchOS With SwiftUI by Tutorials in as many apps as you want, but must include this attribution line somewhere inside your app: “Artwork/images/designs: from watchOS With SwiftUI by Tutorials, available at www.raywenderlich.com”. • The source code included in watchOS With SwiftUI by Tutorials is for your personal use only. You are NOT allowed to distribute or sell the source code in watchOS With SwiftUI by Tutorials without prior authorization. • This book is for your personal use only. You are NOT allowed to sell this book without prior authorization, or distribute it to friends, coworkers or students; they would need to purchase their own copies. All materials provided with this book are provided on an “as is” basis, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software. All trademarks and registered trademarks appearing in this guide are the properties of their respective owners. raywenderlich.com 9
Before You Begin This section tells you a few things you need to know before you get started, such as what you’ll need for hardware and software, where to find the project files for this book, and more. raywenderlich.com 10
iWhat You Need To follow along with this book, you’ll need the following: • A Mac running macOS Monterey (12.0) or later. • It is strongly recommended to have an Apple Watch with watchOS 8.0 or higher • Xcode 13.1 or later. Xcode is the main development tool for iOS. You’ll need Xcode 13.1 or later to make use of SwiftUI and the latest features explained throughout the book. You can download the latest version of Xcode from Apple’s developer site here: apple.co/2asi58y — If you have an Apple Developer account, you can also download any Xcode version here: apple.co/3GWcz96. Note: The code covered in this book was developed and tested with Swift 5.5, macOS Monterey and Xcode 13.1 — so even though you can work with slightly earlier versions of them, we encourage you to update to those versions to follow along the book without unexpected errors. raywenderlich.com 11
iiBook Source Code & Forums Where to download the materials for this book The materials for this book can be cloned or downloaded from the GitHub book materials repository: • https://github.com/raywenderlich/wos-materials/tree/editions/1.0 Forums We’ve also set up an official forum for the book at forums.raywenderlich.com/c/ books/watchos-with-swiftui. This is a great place to ask questions about the book or to submit any errors you may find. raywenderlich.com 12
“This book is dedicated to my wife and daughter, both of whom gave up many a night so that I could work on it, as well as to my parents who always made sure a good education was a priority.” — Scott Grosch raywenderlich.com 13
About the Author Scott Grosch has been involved with iOS app development since the first release of the public SDK from Apple. He mostly works with a small set of clients on a couple large apps. During the day, Scott is a Solutions Architect at a Fortune 500 company in the Pacific Northwest. At night, he’s still working on figuring out how to be a good parent to a toddler with his wife. About the Editors Pablo Mateo is the final pass editor for this book. He is Delivery Manager at at one of the biggest Banks in the world, and was also founder and CTO of a Technology Development company in Madrid. His expertise is focused on web and mobile app development, although he first started as a Creative Art Director. He has been for many years the Main Professor of the iOS and Android Mobile Development Masters Degree at a well-known technology school in Madrid (CICE). He has a masters degree in Artificial Intelligence & Machine-Learning and is currently learning Quantum Computing at MIT. watchOS With SwiftUI by Tutorials About the Team raywenderlich.com 14
Nick Rogness is a tech editor for this book. He has been writing code professionally since 2004 and an iOS developer since iOS 9. He looks for any reason to get outdoors, running, biking, hiking, camping, whatever it takes. Piotr Fulmanski is a tech editor for this book. Piotr has been working at the Faculty of Mathematics and Computer Science of the University of Lodz since 2001 where he teaches various computer science subjects. When he is not preparing materials for his students, he runs in the forest or makes toys for his children. He spends his vacation in the mountains with his family. April Rames is the english language editor for this book. April is a former high school English and theatre teacher and director. When not volunteering at her daughters’ schools, she usually spends her time being asked to pretend to be a unicorn, zombie princess or super hero. In her spare time, she enjoys reading, making pasta and exploring the Gulf Coast with her family. watchOS With SwiftUI by Tutorials About the Team raywenderlich.com 15
vIntroduction Since the Apple Watch came out in 2015, step by step it has been making a dominan position in the market, becoming an indispensable complement for many users. It has proven to be a tremendously useful device with which you can see all your notifications without having to take out the phone, or check valuable information from your favorite apps at a glance. It has even become the perfect companion for those who like practicing all sort of sports. This book will teach you how to make the most of it. Implementing all the functionalities and capabilities this small device you wear on your wrist provides. From showing notifications to how to use snapshots to provide updated information. Or why complications are so important. Even how to integrate HealthKit into your apps! As well as many other concepts that we encourage you to discover by reading this book. All this using SwiftUI, the declarative framework to build applications designed by Apple. You will see how easy it is to build incredible applications for your Watch. We hope you enjoy this book almost as much as we have enjoyed creating it. We can’t wait to see what you’re going to build after reading it! raywenderlich.com 16
How to read this book This book can be read from cover to cover, but you can also pick and choose the chapters that interest you the most, or the chapters you need immediately for your current projects. Some chapters go together, like the Complications ones, but most of them can be read independently. We also recommend you to read through SwiftUI Apprentice or SwiftUI by Tutorials, if you don’t have a strong knowledge on the SwiftUI framework. Finally, for all readers, raywenderlich.com is committed to providing quality, up-to- date learning materials. We’d love to have your feedback. What parts of the book gave you one of those aha learning moments? Was some topic confusing? Did you spot a typo or an error? Let us know at forums.raywenderlich.com and look for the particular forum category for this book. We’ll make an effort to take your comments into account in the next update of the book. watchOS With SwiftUI by Tutorials Introduction raywenderlich.com 17
Section I raywenderlich.com 18
1Chapter 1: Hello, Apple Watch By Scott Grosch In 2015, Apple promised the world it was going to release a new, revolutionary device. On April 24, 2015, it released the first generation Apple Watch to the public. Some people felt the device was awesome and had huge potential, while others were firmly in the “meh” camp. Full disclosure, I was initially one of the latter people. However, with the addition of features like the Wallet and Apple Pay, as well as the option to purchase cellular data plans for the watch, it’s hard to dismiss the device as a fad. Whatever your feelings regarding the Apple Watch, it’s a part of the Apple ecosystem you’ll definitely want to support to ensure maximum exposure for your apps. During this chapter, you’ll create your first watchOS app and see how much of your existing iOS development knowledge directly transfers to the Apple Watch. raywenderlich.com 19
Hello, World! Open Xcode and create a new project by selecting File ▸ New ▸ Project… or pressing Shift-Command-N. In the dialog window where you choose your project type, select the watchOS tab and then choose the Watch App template: When developing projects that support the Apple Watch, you can choose whether you’ll provide a companion iOS app. Since this book aims to teach items specific to watchOS development, most of the chapters focus exclusively on the watchOS project. Only features that require a companion iOS app will include an iOS project. Next, you’ll see the standard options dialog. Enter a Product Name, such as HelloAppleWatch, and then uncheck the box at the bottom titled Include Notification Scene: In a future chapter, you’ll learn how to send push notifications to the Apple Watch, so there’s no need to include the relevant code in the created project. watchOS With SwiftUI by Tutorials Chapter 1: Hello, Apple Watch raywenderlich.com 20