What s New in tvos 12

Similar documents
Introducing Password AutoFill for Apps

What s New in tvos #WWDC16. App Frameworks. Session 206. Hans Kim tvos Engineer

Extending Your Apps with SiriKit

Automatic Strong Passwords and Security Code AutoFill

Mastering UIKit on tvos

Using and Extending the Xcode Source Editor

Modern User Interaction on ios

Enhancing your apps for the next dimension of touch

ios Accessibility Developing for everyone Session 201 Ian Fisch ios Accessibility

Quick Interaction Techniques for watchos

Leveraging Touch Input on ios

Seamless Linking to Your App

What's New in UIKit Dynamics and Visual Effects Session 229

Media and Gaming Accessibility

What s New in MapKit. App Frameworks #WWDC17. Fredrik Olsson

Implementing UI Designs in Interface Builder

What s New in SpriteKit

What s New in imessage Apps

Data Delivery with Drag and Drop

Accessibility on ios. Developing for everyone. Frameworks #WWDC14. Session 210 Clare Kasemset ios Accessibility

Mastering Drag and Drop

Using Grouped Notifications

Accessibility on OS X

Introducing the Modern WebKit API

Getting the Most out of Playgrounds in Xcode

Advanced Notifications

Monetize and Promote Your App with iad

Building Apps with Dynamic Type

New UIKit Support for International User Interfaces

What s New in watchos

Advanced Scrollviews and Touch Handling Techniques

What s New in Xcode App Signing

Cocoa Touch Best Practices

What s New in NSCollectionView Session 225

View Controller Advancements for ios8

imessage Apps and Stickers, Part 2

Introduction to Siri Shortcuts

Touch Bar Fundamentals

Designing Great Apple Watch Experiences

Building Visually Rich User Experiences

INTRODUCTION TO ARCHITECTING YOUR IOS APP

What s New in Testing

What s New in Foundation for Swift Session 207

What s New in Cocoa for macos

Stanford CS193p. Developing Applications for ios. Winter CS193p. Winter 2017

What s New in Core Data?

Stanford CS193p. Developing Applications for ios. Spring CS193p. Spring 2016

SceneKit in Swift Playgrounds

Enabling Your App for CarPlay

What s New in CloudKit

Building for Voice with Siri Shortcuts

lecture 10 UI/UX and Programmatic Design cs : spring 2018

SceneKit: What s New Session 604

Building Faster in Xcode

What s New in ARKit 2

Building Watch Apps #WWDC15. Featured. Session 108. Neil Desai watchos Engineer

What's New in Core Spotlight

New Ways to Work with Workouts

Introducing On Demand Resources

Stanford CS193p. Developing Applications for ios. Winter CS193p. Winter 2017

What s New in SiriKit

Core ML in Depth. System Frameworks #WWDC17. Krishna Sridhar, Core ML Zach Nation, Core ML

Introducing the Contacts Framework

WatchKit In-Depth, Part 2

Getting the Most Out of HealthKit

Managing Documents In Your ios Apps

Improving your Existing Apps with Swift

Getting Started with CareKit

Stanford CS193p. Developing Applications for ios. Spring CS193p. Spring 2016

What s New in Notifications

What s New in Swift Playgrounds

Integrating Apps and Content with AR Quick Look

Introducing Swift Playgrounds

Creating Content with iad JS

Advances in AVFoundation Playback

Validating HTTP Live Streams

What s New in TVMLKit

A Better MVC. 300 line view controllers or bust. Dave A guy who thinks too deeply about stuff

Creating Extensions for Safari

Mysteries of Auto Layout, Part 1

Vision Framework. Building on Core ML. Media #WWDC17. Brett Keating, Apple Manager Frank Doepke, He who wires things together

Core Data Best Practices

Designing for Apple Watch

What s New in HomeKit

Creating Complications with ClockKit Session 209

View Controller Lifecycle

CarPlay Audio and Navigation Apps

Stanford CS193p. Developing Applications for ios. Winter CS193p! Winter 2015

What s New in Device Configuration, Deployment, and Management

Creating Great App Previews

Introducing SiriKit. Hey Siri, say hello to apps #WWDC16. App Frameworks. Session 217

Mobile Application Programing: ios. Messaging

Localizing with Xcode 9

Swift API Design Guidelines

Announcements. Today s Topics

App Extension Best Practices

Localization Best Practices on tvos

Adapting to the New UI of OS X Yosemite

Content Protection for HTTP Live Streaming

Login Troubleshooting

Transcription:

#WWDC18 What s New in tvos 12 Session 208 Hans Kim, tvos Engineering 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

Agenda

Agenda Password AutoFill

Agenda Password AutoFill Focus Engine enhancement

Agenda Password AutoFill Focus Engine enhancement UI patterns

Password AutoFill Alex Sanciangco, tvos Engineering Conrad Shultz, tvos Engineering

Demo

Ensure QuickType bar appears

Ensure QuickType bar appears Get your app s credentials on the QuickType bar

Ensure QuickType bar appears Get your app s credentials on the QuickType bar Enable one-tap sign in

Ensure QuickType Bar Appears Adopt UITextContentType

Ensure QuickType Bar Appears Adopt UITextContentType tvos will try to automatically detect username and password fields

Ensure QuickType Bar Appears Adopt UITextContentType tvos will try to automatically detect username and password fields Explicitly mark the text field types

Ensure QuickType Bar Appears Adopt UITextContentType tvos will try to automatically detect username and password fields Explicitly mark the text field types let usernamefield = UITextField() let passwordfield = UITextField() usernamefield.textcontenttype =.username passwordfield.textcontenttype =.password

QuickType Bar Suggestions Associated Domains

QuickType Bar Suggestions Associated Domains Powers many other features

QuickType Bar Suggestions Associated Domains Powers many other features Strong relationship between app and website

QuickType Bar Suggestions Associated Domains Powers many other features Strong relationship between app and website Introducing Password AutoFill for Apps WWDC 2017

Enable One-Tap Sign In Implement preferredfocusenvironments

Enable One-Tap Sign In Implement preferredfocusenvironments AutoFill will perform a focused button s action after filling

Enable One-Tap Sign In Implement preferredfocusenvironments AutoFill will perform a focused button s action after filling Implement preferredfocusenvironments to provide your login button for focus

// Sample Implementation override var preferredfocusenvironments: [UIFocusEnvironment] { if let username = usernametextfield.text, let password = passwordtextfield.text { return [loginbutton] } else { return [usernametextfield] } }

// Sample Implementation override var preferredfocusenvironments: [UIFocusEnvironment] { if let username = usernametextfield.text, let password = passwordtextfield.text { return [loginbutton] } else { return [usernametextfield] } }

// Sample Implementation override var preferredfocusenvironments: [UIFocusEnvironment] { if let username = usernametextfield.text, let password = passwordtextfield.text { return [loginbutton] } else { return [usernametextfield] } }

// Sample Implementation override var preferredfocusenvironments: [UIFocusEnvironment] { if let username = usernametextfield.text, let password = passwordtextfield.text { return [loginbutton] } else { return [usernametextfield] } }

// Sample Implementation override var preferredfocusenvironments: [UIFocusEnvironment] { if let username = usernametextfield.text, let password = passwordtextfield.text { return [loginbutton] } else { return [usernametextfield] } }

Summary

Summary Reduce the friction of signing into your app with Password AutoFill

Summary Reduce the friction of signing into your app with Password AutoFill Tag your text fields with appropriate UITextContentType

Summary Reduce the friction of signing into your app with Password AutoFill Tag your text fields with appropriate UITextContentType Adopt Associated Domains

Summary Reduce the friction of signing into your app with Password AutoFill Tag your text fields with appropriate UITextContentType Adopt Associated Domains Implement preferredfocusenvironments

Focus Enhancements Ada Turner, tvos Engineering

Focus on tvos

Focus on tvos

Focus on tvos UIKit

Focus on tvos UIKit SpriteKit

Focus on tvos UIKit SpriteKit SceneKit

NEW Focus Engine now supports apps regardless of how they are rendered.

What s Included

What s Included State management

What s Included State management Focus item geometry

What s Included State management Focus item geometry Accessibility

What s Included State management Focus item geometry Accessibility tvos s native feel Momentum during swipes Scrolling inertia Focus movement hinting

Focus Components

Focus Components UIFocusEnvironment

Focus Components UIFocusEnvironment UIFocusItem

Focus Components UIFocusEnvironment UIFocusSystem UIFocusItem

Focus Components UIFocusEnvironment UIFocusSystem UIFocusItem Focus Interaction in tvos 11 WWDC 2017

New Focus Features

New Focus Features UIFocusEnvironment UIFocusSystem UIFocusItem

New Focus Features NEW UIFocusEnvironment UIFocusSystem UIFocusItem

New Focus Features NEW UIFocusItemContainer UIFocusEnvironment UIFocusSystem UIFocusItem

New Focus Features NEW UIFocusItemContainer UIFocusEnvironment UIFocusSystem UIFocusItem

New Focus Features NEW UIFocusItemContainer UIFocusEnvironment UIFocusSystem UIFocusItemScrollable Container UIFocusItem

New Focus Features NEW UIFocusItemContainer UIFocusEnvironment UIFocusSystem UIFocusItemScrollable Container UIFocusItem UIFocusMovementHint

Adopting New Focus API

UIFocusEnvironment NEW UIFocusEnvironment

UIFocusEnvironment NEW UIFocusEnvironment Hooking into the focus engine weak var parentfocusenvironment: UIFocusEnvironment? var focusitemcontainer: UIFocusItemContainer?

UIFocusEnvironment NEW UIFocusEnvironment Hooking into the focus engine weak var parentfocusenvironment: UIFocusEnvironment? var focusitemcontainer: UIFocusItemContainer? Controlling and reacting to focus updates var preferredfocusenvironments: [UIFocusEnvironment] func shouldupdatefocus(in context: UIFocusUpdateContext) -> Bool func didupdatefocus(in context: UIFocusUpdateContext, with coordinator: UIFocusAnimationCoordinator)

UIFocusEnvironment NEW UIFocusEnvironment Focus updating functions

UIFocusEnvironment NEW UIFocusEnvironment Focus updating functions func setneedsfocusupdate() { } UIFocusSystem(for: self)?.requestfocusupdate(to: self) func updatefocusifneeded() { } UIFocusSystem(for: self)?.updatefocusifneeded()

UIFocusItemContainer NEW UIFocusEnvironment UIFocusItemContainer

UIFocusItemContainer NEW UIFocusEnvironment Provide a coordinatespace UIFocusItemContainer UIView provides itself

UIFocusItemContainer NEW UIFocusEnvironment Provide a coordinatespace UIFocusItemContainer UIView provides itself Implement focusitems(in rect: CGRect) Return Focus Items whose frames intersect with rect rect is expressed in coordinatespace Focus Items frames must also be expressed in coordinatespace

UIFocusItem NEW UIFocusEnvironment UIFocusItemContainer UIFocusItem UIFocusItem UIFocusItem

UIFocusItem NEW UIFocusEnvironment Inherits from UIFocusEnvironment UIFocusItemContainer UIFocusItem UIFocusItem UIFocusItem

UIFocusItem NEW UIFocusEnvironment Inherits from UIFocusEnvironment UIFocusItemContainer Implement canbecomefocused UIFocusItem UIFocusItem UIFocusItem

UIFocusItem NEW UIFocusEnvironment Inherits from UIFocusEnvironment UIFocusItemContainer Implement canbecomefocused UIFocusItem Implement didhintfocusmovement(_ hint: UIFocusMovementHint) UIFocusItem UIFocusItem

UIFocusItem NEW UIFocusEnvironment Inherits from UIFocusEnvironment UIFocusItemContainer Implement canbecomefocused UIFocusItem Implement didhintfocusmovement(_ hint: UIFocusMovementHint) Provide a frame UIFocusItem Same coordinate space as its containing UIFocusItemContainer UIFocusItem

UIFocusMovementHint NEW 1 class UIFocusMovementHint : NSObject, NSCopying { var movementdirection: CGVector { get } var perspectivetransform: CATransform3D { get } var rotation: CGVector { get } var translation: CGVector { get } -1 1 var interactiontransform: CATransform3D { get } } -1

UIFocusMovementHint NEW 1 class UIFocusMovementHint : NSObject, NSCopying { var movementdirection: CGVector { get } var perspectivetransform: CATransform3D { get } var rotation: CGVector { get } var translation: CGVector { get } -1 1 var interactiontransform: CATransform3D { get } } -1

UIFocusMovementHint NEW 1 class UIFocusMovementHint : NSObject, NSCopying { var movementdirection: CGVector { get } var perspectivetransform: CATransform3D { get } var rotation: CGVector { get } var translation: CGVector { get } -1 1 var interactiontransform: CATransform3D { get } }. -1

UIFocusMovementHint NEW 1 class UIFocusMovementHint : NSObject, NSCopying { var movementdirection: CGVector { get } var perspectivetransform: CATransform3D { get } var rotation: CGVector { get } var translation: CGVector { get } -1 1 var interactiontransform: CATransform3D { get } }. -1

UIFocusMovementHint NEW 1 class UIFocusMovementHint : NSObject, NSCopying { var movementdirection: CGVector { get } var perspectivetransform: CATransform3D { get } var rotation: CGVector { get } var translation: CGVector { get } -1 1 var interactiontransform: CATransform3D { get } } -1

UIFocusMovementHint NEW 1 class UIFocusMovementHint : NSObject, NSCopying { var movementdirection: CGVector { get } var perspectivetransform: CATransform3D { get } var rotation: CGVector { get } var translation: CGVector { get } -1 1 var interactiontransform: CATransform3D { get } } -1

UIFocusMovementHint NEW 1 class UIFocusMovementHint : NSObject, NSCopying { var movementdirection: CGVector { get } var perspectivetransform: CATransform3D { get } var rotation: CGVector { get } var translation: CGVector { get } -1 1 var interactiontransform: CATransform3D { get } } -1

UIFocusItemScrollableContainer NEW UIFocusEnvironment ScrollableContainer UIFocusItem UIFocusItem UIFocusItem UIFocusItem

UIFocusItemScrollableContainer NEW UIFocusEnvironment Inherits from UIFocusItemContainer ScrollableContainer UIFocusItem UIFocusItem UIFocusItem UIFocusItem

UIFocusItemScrollableContainer NEW UIFocusEnvironment Inherits from UIFocusItemContainer Three additional properties ScrollableContainer UIFocusItem UIFocusItem UIFocusItem UIFocusItem

UIFocusItemScrollableContainer NEW UIFocusEnvironment Inherits from UIFocusItemContainer Three additional properties ScrollableContainer UIFocusItem var contentoffset: CGPoint { get set } UIFocusItem UIFocusItem UIFocusItem

UIFocusItemScrollableContainer NEW UIFocusEnvironment Inherits from UIFocusItemContainer Three additional properties ScrollableContainer UIFocusItem var contentoffset: CGPoint { get set } var contentsize: CGSize { get } UIFocusItem UIFocusItem UIFocusItem

UIFocusItemScrollableContainer NEW UIFocusEnvironment Inherits from UIFocusItemContainer Three additional properties ScrollableContainer UIFocusItem var contentoffset: CGPoint { get set } var contentsize: CGSize { get } UIFocusItem var visiblesize: CGSize { get } UIFocusItem UIFocusItem

UIFocusItemScrollableContainer NEW UIFocusEnvironment Inherits from UIFocusItemContainer Three additional properties ScrollableContainer UIFocusItem var contentoffset: CGPoint { get set } var contentsize: CGSize { get } UIFocusItem var visiblesize: CGSize { get } contentoffset is set automatically UIFocusItem UIFocusItem

UIFocusItemScrollableContainer NEW UIFocusEnvironment Inherits from UIFocusItemContainer Three additional properties ScrollableContainer UIFocusItem var contentoffset: CGPoint { get set } var contentsize: CGSize { get } UIFocusItem var visiblesize: CGSize { get } contentoffset is set automatically UIFocusItem UIFocusItem

Accessibility

Accessibility It s incredibly easy!

Accessibility It s incredibly easy! Implement UIFocusItemContainer.focusItems(in rect: CGRect)

Accessibility It s incredibly easy! Implement UIFocusItemContainer.focusItems(in rect: CGRect) Set accessibilitylabel and accessibilityhint on your Focus Items

Accessibility It s incredibly easy! Implement UIFocusItemContainer.focusItems(in rect: CGRect) Set accessibilitylabel and accessibilityhint on your Focus Items What s New in Accessibility WWDC 2016

Demo Focus-powered Metal app Paul Schneider, tvos Engineering

Summary

Summary Implement custom UIFocusEnvironments and UIFocusItems

Summary Implement custom UIFocusEnvironments and UIFocusItems Even with non-uikit components!

Summary Implement custom UIFocusEnvironments and UIFocusItems Even with non-uikit components! Support Focus movement with UIFocusItemContainer

Summary Implement custom UIFocusEnvironments and UIFocusItems Even with non-uikit components! Support Focus movement with UIFocusItemContainer Hint at interaction with UIFocusMovementHint

Summary Implement custom UIFocusEnvironments and UIFocusItems Even with non-uikit components! Support Focus movement with UIFocusItemContainer Hint at interaction with UIFocusMovementHint Automatically scroll with UIFocusItemScrollableContainer

Summary Implement custom UIFocusEnvironments and UIFocusItems Even with non-uikit components! Support Focus movement with UIFocusItemContainer Hint at interaction with UIFocusMovementHint Automatically scroll with UIFocusItemScrollableContainer Full accessibility support

Summary Implement custom UIFocusEnvironments and UIFocusItems Even with non-uikit components! Support Focus movement with UIFocusItemContainer Hint at interaction with UIFocusMovementHint Automatically scroll with UIFocusItemScrollableContainer Full accessibility support Available in the Developer Beta

UI Patterns Hans Kim, tvos Engineering

Text Scrolling Marquee

Text Scrolling Marquee Present variable-length strings in fixed geometry

Text Scrolling Marquee NEW Present variable-length strings in fixed geometry Visually highlights current focus

UILabel Marquee label.enablesmarqueewhenancestorfocused = true

UILabel Marquee NEW label.enablesmarqueewhenancestorfocused = true

NEW Label Label Label

NEW Label Label Label

NEW Label string too long for label string too lon Label

NEW Label string too long for label string too lon Label

TVUIKit

TVUIKit NEW

Poster NEW

NEW Poster Caption Button

Poster Caption Button Card NEW

Poster Caption Button Card Monogram NEW

TVPosterView NEW

TVPosterView NEW image

TVPosterView NEW image title subtitle

TVPosterView NEW image title subtitle

TVPosterView NEW image title subtitle

TVPosterView NEW image title subtitle

TVPosterView NEW image title subtitle

TVPosterView NEW image title subtitle

TVPosterView NEW image title subtitle

TVPosterView NEW image title subtitle

TVCaptionButtonView NEW

TVCaptionButtonView NEW content

TVCaptionButtonView NEW content title subtitle

TVCaptionButtonView NEW content title subtitle

TVCaptionButtonView NEW title subtitle

TVCaptionButtonView NEW $9.99 title subtitle

TVCaptionButtonView NEW $9.99 title subtitle

TVCaptionButtonView NEW $9.99 title subtitle

TVCaptionButtonView NEW $9.99 title subtitle

TVCaptionButtonView NEW $9.99 title subtitle

TVCaptionButtonView NEW $9.99 title subtitle

TVCardView NEW

TVCardView NEW

TVCardView NEW

TVCardView NEW

TVCardView NEW

TVMonogramView NEW

TVMonogramView NEW content image

TVMonogramView NEW content image title subtitle

TVMonogramView NEW title subtitle

TVMonogramView NEW John Appleseed title subtitle

TVMonogramView NEW JA John Appleseed title subtitle

TVMonogramView NEW JA title subtitle

TVMonogramView NEW JA title subtitle

TVMonogramView NEW title subtitle

TVMonogramView NEW title subtitle

NEW

Poster Caption Button Card Monogram NEW

Common Theme NEW content

Common Theme NEW header content footer

Common Theme NEW header content footer

Common Theme NEW header content footer

TVPosterView TVCaptionButton TVCardView TVMonogramView NEW

TVPosterView TVCaptionButton TVCardView TVMonogramView NEW

NEW TVLockupView TVPosterView TVCaptionButton TVCardView TVMonogramView

TVLockupView NEW header content footer

TVLockupView NEW header content footer

TVLockupView NEW header content footer

TVLockupView NEW header content footer

TVLockupView NEW header content footer

TVLockupView Custom content NEW

TVLockupView Custom content NEW @available(tvos 12.0, *) public protocol TVLockupViewComponent : NSObjectProtocol { optional public func updateappearance(forlockupviewstate state: UIControl.State) }

TVLockupView Custom content NEW @available(tvos 12.0, *) public protocol TVLockupViewComponent : NSObjectProtocol { optional public func updateappearance(forlockupviewstate state: UIControl.State) }

TVLockupView NEW

TVLockupView NEW Your own widget that responds to focus

TVLockupView NEW Your own widget that responds to focus Customize 4 special purpose subclasses TVPosterView TVCaptionButtonView TVCardView TVMonogramView

TVDigitEntryViewController NEW

TVDigitEntryViewController NEW

TVDigitEntryViewController NEW

TVDigitEntryViewController NEW

TVDigitEntryViewController NEW

TVDigitEntryViewController NEW

@available(tvos 12.0, *) NEW open class TVDigitEntryViewController : UIViewController { open var entrycompletionhandler: (String) -> Swift.Void open var titletext: String? open var prompttext: String? open var issecuredigitentry: Bool open var numberofdigits: UInt } open func clearentry(animated: Bool)

@available(tvos 12.0, *) NEW open class TVDigitEntryViewController : UIViewController { open var entrycompletionhandler: (String) -> Swift.Void open var titletext: String? open var prompttext: String? open var issecuredigitentry: Bool open var numberofdigits: UInt } open func clearentry(animated: Bool)

@available(tvos 12.0, *) NEW open class TVDigitEntryViewController : UIViewController { open var entrycompletionhandler: (String) -> Swift.Void open var titletext: String? open var prompttext: String? open var issecuredigitentry: Bool open var numberofdigits: UInt } open func clearentry(animated: Bool)

@available(tvos 12.0, *) NEW open class TVDigitEntryViewController : UIViewController { open var entrycompletionhandler: (String) -> Swift.Void open var titletext: String? open var prompttext: String? open var issecuredigitentry: Bool open var numberofdigits: UInt } open func clearentry(animated: Bool)

Demo Marshall Huss, tvos Engineering

TVUIKit NEW

TVUIKit NEW Easy adoption of common UI patterns

TVUIKit NEW Easy adoption of common UI patterns Built-in support for localization and accessibility

TVUIKit NEW Easy adoption of common UI patterns Built-in support for localization and accessibility Developer Beta

Summary

Summary Password AutoFill

Summary Password AutoFill Focus Engine enhancement

Summary Password AutoFill Focus Engine enhancement TVUIKit

More Information https://developer.apple.com/wwdc2018/208 tvos Lab Technology Lab 7 Wednesday 9:00AM tvos Lab Technology Lab 7 Thursday 1:00PM

More Information https://developer.apple.com/wwdc2018/208 Safari, WebKit, and Password AutoFill Lab Technology Lab 3 Wednesday 2:00PM Safari, WebKit, and Password AutoFill Lab Technology Lab 4 Friday 2:45PM