SlideShare una empresa de Scribd logo
1 de 32
Descargar para leer sin conexión
Evan Maloney Distinguished Engineer, Gilt Groupe
tvOS,
the Focus Engine
& Swift
Discoveries from building “Gilt on TV”
Demoing “Gilt on TV”
tvOS vs. iOS: Similarities
• Most of tvOS is a direct subset of iOS
• Familiarity with UIKit will serve you well with tvOS
• But, some of the things you may expect won’t be there
• No web views
• Certain frameworks like MultipeerConnectivity aren’t
available
• Several UIControls (pickers, steppers, sliders, etc.)
• Can use Interface Builder (or not), Swift or Objective-C
tvOS tvOS vs. iOS
tvOS vs. iOS: Differences
• User interaction is indirect touch
• Unlike an iPhone or iPad, the user doesn’t directly
manipulate the UI — uses indirect touch like a trackpad
• Directionality is reversed from iOS
• Relies on the Focus Engine for determining UI state
• Only on tvOS — adds extensions to UIViewController,
UIView, UITableView, UICollectionView, etc.
tvOS tvOS vs. iOS
Focus Engine Philosophy
• The Focus Engine is intended to be a black box
• You provide inputs that determine the initially focused view
• You define where the user can go
• Provide some visual indication of focusability
• Provide an animation or visual state change upon
becoming focused (often handled by the tvOS SDK)
• Once your view controller is onscreen and the initial view has
become focused, the user should be in control of all state
changes
• It is considered rude to forcibly change focus on the user
tvOS The Focus Engine
What is “Focus”?
• A focusable view is one that the user can select with the touch
remote
• Being focusable implies that the user can perform an action on
the view
• Focusable views are often “pressable,” like UIButtons
• A focused view renders itself to stand out from the others
onscreen, usually with one or more of the following attributes:
• A larger size
• A drop shadow
• A highlight color or border
tvOS Focus
How does the Focus Engine work?
• When the view hierarchy changes, the Focus Engine creates a
map of the visible focusable views
• If the user navigates in a given direction, the Focus Engine
looks for a focusable view in that direction, taking into account
each candidate view’s focus frame size & relative position
• A candidate for receiving next focus is selected
• If the candidate is a table or collection cell, the relevant
delegate is given an opportunity to reject focus and another
candidate may be selected
tvOS The Focus Engine
tvOS The Focus Engine
Gilt on TV 1.0 — Women’s Store
tvOS The Focus Engine
Focus Frames
How does a view become “Focusable”?
• By default, the following views are focusable:
• UIControls
• Table cells and collection cells
• Can be overridden by UICollectionViewDelegate
• UIViews that are not otherwise focusable can be made so by
overriding canBecomeFocused()
• The focused property of a UIView indicates whether the
view is currently in focus
tvOS Focus
How does a view become “Focused”?
• When a view controller is displayed, the focus engine asks for
the preferredFocusedView from the relevant views and
view controllers to determine which view gets initial focus
• From there, the user controls focus using the remote
• When the user swipes in a given direction, the Focus Engine
selects an appropriate focusable view to get next focus
• Developers can use the UIFocusUpdateContext to
coordinate animations when views go into and out of focus
tvOS Focus
tvOS The Focus Engine
Gilt on TV 1.0 — Men’s Store (scrolled)
tvOS The Focus Engine
Focus Frames
tvOS The Focus Engine
Changing Focus — Unambiguous Move
tvOS The Focus Engine
Ambiguous Move — Focus Engine Chooses
tvOS The Focus Engine
Sale View
tvOS The Focus Engine
Focus Frames
tvOS The Focus Engine
Navigating to “Buy Now” — A Near Miss
The Dilemma
tvOS Focus Guides
How could you solve it?
You can’t assume the Focus Engine “sees” focusable views that
aren’t in the direct path of the swipe direction
tvOS solution
Allow a UIView to report to a focus frame that’s larger than the
view’s native frame
1. Call parentView.addLayoutGuide(UIFocusGuide)
2. Set the focus guide’s preferredFocusedView
3. Add Auto Layout constraints using the focus guide as you
would any UIView
tvOS Focus Guides
A focus guide defines a screen rectangle
tvOS Focus Guides
Focus is forwarded to the preferredFocusedView
tvOS Focus Guides
Allowing a small button to respond to a large frame
Handling scrolling content
• You will not be able to present scrolling content in the same
way you do in iOS
• User can only scroll by navigating to something focusable
within a scroll view
• The Focus Engine only pays attention to focusable non-hidden
views with non-zero alphas that have at least one pixel within
the screen bounds
• Focusable views and cells that are offscreen won’t be visible
to the Focus Engine, so the user can’t navigate to them
tvOS The Focus Engine
tvOS Focus Guides
Product View
tvOS Focus Guides
Focus Frames
Other challenges for tvOS developers
• Apparently a lot of people rely on web views for mission-critical
screens within their apps — they will be forced to rethink
• Restrictions on App Store binaries:
• Applications need to be submitted as Bitcode binaries
• This includes embedded frameworks, which makes many
third-party closed-source frameworks unusable in tvOS
• On-device testing — Very few people have development
devices, and simulator testing may not reveal all problems
tvOS tvOS Development
Fun things about tvOS development
• Some of the iOS pain points don’t exist on tvOS
• Apple TVs will often be used to stream video — unlike with
mobile devices, tvOS developers can assume the presence
of low-latency, always-on, high-bandwidth networks
• Don’t need to think about screen rotation or size class
changes
• Only need to develop for a single screen resolution — for
now
tvOS tvOS Development
A few words about Swift
and finally…
Swift — Pain Points
• The language is still changing, so major releases of Xcode
often require a bit of code rewriting
• Usually minimal, and the language is improving as a result
• Developer tooling still needs work
• Debugger sometimes refuses to cough up variable values
• Compiler errors can be vague or misleading
• Compiler stability is sometimes an issue
• Heavy use of Swift frameworks sometimes doesn’t play
nicely with “whole module optimization”
• Binaries may not be compatible across compiler versions
tvOS Swift
Swift — Advantages
• Swift may not be mature, but it is ready for prime-time
• Swift absolutely fulfills the promise of more efficient
development
• An entire class of errors that used to require runtime
debugging is now caught by the compiler
• Building a stable app takes much less work than Objective-C
• I probably spent about ¼ the time debugging as I would
have had to do in ObjC
• Coding in Swift is an absolute pleasure
tvOS Swift
Swift — The Verdict
tvOS Swift
Do it!
You know you’ll “go Swift” eventually…
…and the longer you wait, the more you’ll be kicking yourself
for not having done it sooner once you finally do!
Evan Maloney Distinguished Engineer, Gilt Groupe
A parting gift for you
https://github.com/emaloney/CleanroomLogger
CleanroomLogger — A pure Swift logging engine
Simple, lightweight & performant
Code goodies!

Más contenido relacionado

Destacado

Destacado (11)

Dsug 05 02-15 - ScalDI - lightweight DI in Scala
Dsug 05 02-15 - ScalDI - lightweight DI in ScalaDsug 05 02-15 - ScalDI - lightweight DI in Scala
Dsug 05 02-15 - ScalDI - lightweight DI in Scala
 
Handling Changes to Your Server-Side Data Model
Handling Changes to Your Server-Side Data ModelHandling Changes to Your Server-Side Data Model
Handling Changes to Your Server-Side Data Model
 
An Intro to Swift
An Intro to SwiftAn Intro to Swift
An Intro to Swift
 
Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"
Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"
Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"
 
Introduction to tvOS app Development !
Introduction to tvOS app Development !Introduction to tvOS app Development !
Introduction to tvOS app Development !
 
The new Apple TV and the tvOS
The new Apple TV and the tvOSThe new Apple TV and the tvOS
The new Apple TV and the tvOS
 
tvOS
tvOStvOS
tvOS
 
Building Apps for Apple TV
Building Apps for Apple TVBuilding Apps for Apple TV
Building Apps for Apple TV
 
Scaling micro services at gilt
Scaling micro services at giltScaling micro services at gilt
Scaling micro services at gilt
 
AbemaTV on tvOS
AbemaTV on tvOSAbemaTV on tvOS
AbemaTV on tvOS
 
Zuul @ Netflix SpringOne Platform
Zuul @ Netflix SpringOne PlatformZuul @ Netflix SpringOne Platform
Zuul @ Netflix SpringOne Platform
 

Similar a tvOS, The Focus Engine, and Swift

Session 16 - Designing universal interface which used for iPad and iPhone
Session 16  -  Designing universal interface which used for iPad and iPhoneSession 16  -  Designing universal interface which used for iPad and iPhone
Session 16 - Designing universal interface which used for iPad and iPhone
Vu Tran Lam
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 application
Vu Tran Lam
 
iOS Programming 101
iOS Programming 101iOS Programming 101
iOS Programming 101
rwenderlich
 
Cross Platform Mobile Application Architecture
Cross Platform Mobile Application ArchitectureCross Platform Mobile Application Architecture
Cross Platform Mobile Application Architecture
Derrick Bowen
 
Building a better User Experience for Windows Phone Users
Building a better User Experience for Windows Phone UsersBuilding a better User Experience for Windows Phone Users
Building a better User Experience for Windows Phone Users
Sandra González
 
J query mobile tech talk
J query mobile tech talkJ query mobile tech talk
J query mobile tech talk
woliverj
 

Similar a tvOS, The Focus Engine, and Swift (20)

Session 16 - Designing universal interface which used for iPad and iPhone
Session 16  -  Designing universal interface which used for iPad and iPhoneSession 16  -  Designing universal interface which used for iPad and iPhone
Session 16 - Designing universal interface which used for iPad and iPhone
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 application
 
tvOS: An Introduction for iOS Developers
tvOS: An Introduction for iOS DeveloperstvOS: An Introduction for iOS Developers
tvOS: An Introduction for iOS Developers
 
iOS Programming 101
iOS Programming 101iOS Programming 101
iOS Programming 101
 
Adjusting to Auto Layout (Tutorial / Tips for iOS Auto Layout)
Adjusting to Auto Layout (Tutorial / Tips for iOS Auto Layout)Adjusting to Auto Layout (Tutorial / Tips for iOS Auto Layout)
Adjusting to Auto Layout (Tutorial / Tips for iOS Auto Layout)
 
"WebView, the fifth element" por @fernando_cejas
"WebView, the fifth element" por @fernando_cejas"WebView, the fifth element" por @fernando_cejas
"WebView, the fifth element" por @fernando_cejas
 
Webview: The fifth element
Webview: The fifth elementWebview: The fifth element
Webview: The fifth element
 
Top 4 Cross Platform tools for Mobile App Development
Top 4 Cross Platform tools for Mobile App DevelopmentTop 4 Cross Platform tools for Mobile App Development
Top 4 Cross Platform tools for Mobile App Development
 
Building your first iOS app using Xamarin
Building your first iOS app using XamarinBuilding your first iOS app using Xamarin
Building your first iOS app using Xamarin
 
Cross Platform Mobile Application Architecture
Cross Platform Mobile Application ArchitectureCross Platform Mobile Application Architecture
Cross Platform Mobile Application Architecture
 
Building a better User Experience for Windows Phone Users
Building a better User Experience for Windows Phone UsersBuilding a better User Experience for Windows Phone Users
Building a better User Experience for Windows Phone Users
 
Bringing Swift into your Objective-C Projects
Bringing Swift into your Objective-C ProjectsBringing Swift into your Objective-C Projects
Bringing Swift into your Objective-C Projects
 
[iPlayground] 從 0 到 1 的距離,我與 tvOS 的邂逅
[iPlayground] 從 0 到 1 的距離,我與 tvOS 的邂逅[iPlayground] 從 0 到 1 的距離,我與 tvOS 的邂逅
[iPlayground] 從 0 到 1 的距離,我與 tvOS 的邂逅
 
Animation in iOS
Animation in iOSAnimation in iOS
Animation in iOS
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Learning C# iPad Programming
Learning C# iPad ProgrammingLearning C# iPad Programming
Learning C# iPad Programming
 
Getting started with Xamarin forms
Getting started with Xamarin formsGetting started with Xamarin forms
Getting started with Xamarin forms
 
J query mobile tech talk
J query mobile tech talkJ query mobile tech talk
J query mobile tech talk
 
Create great UIs for budget phones
Create great UIs for budget phonesCreate great UIs for budget phones
Create great UIs for budget phones
 
Why Do Mobile Projects Fail?
Why Do Mobile Projects Fail?Why Do Mobile Projects Fail?
Why Do Mobile Projects Fail?
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

tvOS, The Focus Engine, and Swift

  • 1. Evan Maloney Distinguished Engineer, Gilt Groupe tvOS, the Focus Engine & Swift Discoveries from building “Gilt on TV”
  • 3. tvOS vs. iOS: Similarities • Most of tvOS is a direct subset of iOS • Familiarity with UIKit will serve you well with tvOS • But, some of the things you may expect won’t be there • No web views • Certain frameworks like MultipeerConnectivity aren’t available • Several UIControls (pickers, steppers, sliders, etc.) • Can use Interface Builder (or not), Swift or Objective-C tvOS tvOS vs. iOS
  • 4. tvOS vs. iOS: Differences • User interaction is indirect touch • Unlike an iPhone or iPad, the user doesn’t directly manipulate the UI — uses indirect touch like a trackpad • Directionality is reversed from iOS • Relies on the Focus Engine for determining UI state • Only on tvOS — adds extensions to UIViewController, UIView, UITableView, UICollectionView, etc. tvOS tvOS vs. iOS
  • 5. Focus Engine Philosophy • The Focus Engine is intended to be a black box • You provide inputs that determine the initially focused view • You define where the user can go • Provide some visual indication of focusability • Provide an animation or visual state change upon becoming focused (often handled by the tvOS SDK) • Once your view controller is onscreen and the initial view has become focused, the user should be in control of all state changes • It is considered rude to forcibly change focus on the user tvOS The Focus Engine
  • 6. What is “Focus”? • A focusable view is one that the user can select with the touch remote • Being focusable implies that the user can perform an action on the view • Focusable views are often “pressable,” like UIButtons • A focused view renders itself to stand out from the others onscreen, usually with one or more of the following attributes: • A larger size • A drop shadow • A highlight color or border tvOS Focus
  • 7. How does the Focus Engine work? • When the view hierarchy changes, the Focus Engine creates a map of the visible focusable views • If the user navigates in a given direction, the Focus Engine looks for a focusable view in that direction, taking into account each candidate view’s focus frame size & relative position • A candidate for receiving next focus is selected • If the candidate is a table or collection cell, the relevant delegate is given an opportunity to reject focus and another candidate may be selected tvOS The Focus Engine
  • 8. tvOS The Focus Engine Gilt on TV 1.0 — Women’s Store
  • 9. tvOS The Focus Engine Focus Frames
  • 10. How does a view become “Focusable”? • By default, the following views are focusable: • UIControls • Table cells and collection cells • Can be overridden by UICollectionViewDelegate • UIViews that are not otherwise focusable can be made so by overriding canBecomeFocused() • The focused property of a UIView indicates whether the view is currently in focus tvOS Focus
  • 11. How does a view become “Focused”? • When a view controller is displayed, the focus engine asks for the preferredFocusedView from the relevant views and view controllers to determine which view gets initial focus • From there, the user controls focus using the remote • When the user swipes in a given direction, the Focus Engine selects an appropriate focusable view to get next focus • Developers can use the UIFocusUpdateContext to coordinate animations when views go into and out of focus tvOS Focus
  • 12. tvOS The Focus Engine Gilt on TV 1.0 — Men’s Store (scrolled)
  • 13. tvOS The Focus Engine Focus Frames
  • 14. tvOS The Focus Engine Changing Focus — Unambiguous Move
  • 15. tvOS The Focus Engine Ambiguous Move — Focus Engine Chooses
  • 16. tvOS The Focus Engine Sale View
  • 17. tvOS The Focus Engine Focus Frames
  • 18. tvOS The Focus Engine Navigating to “Buy Now” — A Near Miss
  • 19. The Dilemma tvOS Focus Guides How could you solve it? You can’t assume the Focus Engine “sees” focusable views that aren’t in the direct path of the swipe direction tvOS solution Allow a UIView to report to a focus frame that’s larger than the view’s native frame 1. Call parentView.addLayoutGuide(UIFocusGuide) 2. Set the focus guide’s preferredFocusedView 3. Add Auto Layout constraints using the focus guide as you would any UIView
  • 20. tvOS Focus Guides A focus guide defines a screen rectangle
  • 21. tvOS Focus Guides Focus is forwarded to the preferredFocusedView
  • 22. tvOS Focus Guides Allowing a small button to respond to a large frame
  • 23. Handling scrolling content • You will not be able to present scrolling content in the same way you do in iOS • User can only scroll by navigating to something focusable within a scroll view • The Focus Engine only pays attention to focusable non-hidden views with non-zero alphas that have at least one pixel within the screen bounds • Focusable views and cells that are offscreen won’t be visible to the Focus Engine, so the user can’t navigate to them tvOS The Focus Engine
  • 26. Other challenges for tvOS developers • Apparently a lot of people rely on web views for mission-critical screens within their apps — they will be forced to rethink • Restrictions on App Store binaries: • Applications need to be submitted as Bitcode binaries • This includes embedded frameworks, which makes many third-party closed-source frameworks unusable in tvOS • On-device testing — Very few people have development devices, and simulator testing may not reveal all problems tvOS tvOS Development
  • 27. Fun things about tvOS development • Some of the iOS pain points don’t exist on tvOS • Apple TVs will often be used to stream video — unlike with mobile devices, tvOS developers can assume the presence of low-latency, always-on, high-bandwidth networks • Don’t need to think about screen rotation or size class changes • Only need to develop for a single screen resolution — for now tvOS tvOS Development
  • 28. A few words about Swift and finally…
  • 29. Swift — Pain Points • The language is still changing, so major releases of Xcode often require a bit of code rewriting • Usually minimal, and the language is improving as a result • Developer tooling still needs work • Debugger sometimes refuses to cough up variable values • Compiler errors can be vague or misleading • Compiler stability is sometimes an issue • Heavy use of Swift frameworks sometimes doesn’t play nicely with “whole module optimization” • Binaries may not be compatible across compiler versions tvOS Swift
  • 30. Swift — Advantages • Swift may not be mature, but it is ready for prime-time • Swift absolutely fulfills the promise of more efficient development • An entire class of errors that used to require runtime debugging is now caught by the compiler • Building a stable app takes much less work than Objective-C • I probably spent about ¼ the time debugging as I would have had to do in ObjC • Coding in Swift is an absolute pleasure tvOS Swift
  • 31. Swift — The Verdict tvOS Swift Do it! You know you’ll “go Swift” eventually… …and the longer you wait, the more you’ll be kicking yourself for not having done it sooner once you finally do!
  • 32. Evan Maloney Distinguished Engineer, Gilt Groupe A parting gift for you https://github.com/emaloney/CleanroomLogger CleanroomLogger — A pure Swift logging engine Simple, lightweight & performant Code goodies!