Create an account sign-up and sign-in strategy for Apple Watch.
Users can launch an independent watchOS app as soon as it downloads, even if they don’t have their iPhone. As a result, users must be able to set up the application directly on Apple Watch. If your app requires an account, users must be able to create it and sign in on the watch.
You have the following options for syncing or saving user data:
Create an app that doesn’t require user accounts. Design your app so that it provides a full set of features without user accounts, or use CloudKit to sync and store your user’s data. Apps can access CloudKit data based on the user’s Apple ID without in-app sign-in. watchOS 6 and later also supports CloudKit subscriptions and notifications to let your app respond to changes from other devices.
Create custom sign-in and sign-up forms.
If you choose to create custom forms, watchOS 6 provides tools designed to fit the small screen size and to streamline data entry on Apple Watch.
Simplify Account Creation and Sign-In
To streamline data entry, perform the following steps:
Set the text field’s content type. The text field’s content type modifies how the text input controller and Apple Continuity Keyboard behave. For SwiftUI, set the content type by calling the text field’s
textmethod. For the storyboard, set the content type using the Attributes inspector.
Provide a placeholder that describes the text field’s expected content. Effective placeholders help you get the most out of Apple Watch’s smaller screen. For SwiftUI, when instantiating the text field, the
titleproperty sets the placeholder. For the storyboard, set the placeholder using the Attributes inspector. Note that the system truncates placeholders if the text is too long, so keep your placeholders short.
Set up your app’s associated domains. If you have a website where users can sign in with the same username and password, associate the website’s domain with your app. An associated domain tells the Apple Continuity Keyboard to provide autofill suggestions for usernames and passwords from that domain. To learn how to set up your app’s associated domains, see Supporting Associated Domains in Your App.
Support Password Autofill
To support password autofill on Apple Watch, set the following
watchOS provides an autofill suggestion for
one fields after receiving an SMS message that contains a one-time code.
If you place a
password text field, the Apple Continuity Keyboard attempts to fill both fields. Similarly, if you put two
new fields on the same screen, the keyboard automatically fills both when the user selects the suggested password.
For more information, see Password AutoFill.