Skip to content

Instantly share code, notes, and snippets.

@avidas
Last active January 22, 2016 17:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save avidas/d1f812bc522cfb90f188 to your computer and use it in GitHub Desktop.
Save avidas/d1f812bc522cfb90f188 to your computer and use it in GitHub Desktop.
Apple TV Tech Talk in Austin December 15th

##Takeaways

  • Early trends: PhotoAlbum, On Demand TV, Games, Photo heavy apps e.g. Airbnb, Education for children
  • Apple puts a significant amount of preparation into their presentation. They follow a prompt and all talks follow exact same format.
  • It is early for tvOS but the constraints are interesting. Always connected device, need to access much bigger volume of resources.
  • Emphasize making an app designed for living room
  • tvOS app store has about 40% paid apps as opposed to 10% on iOS, but early to draw conclusion.
  • The framework provides utilites tailored specific to tv experiences, subtitles, playback, ratings, product catalogue information etc.

##INTRO

  • App store has been open for a month
  • media /games/entertainment/digital comic book app are some early examples
  • living room experience
  • focus based interaction
  • attention on great content
  • apple tv is an always connected device
  • TvoS apps download content directly and system manages cache on the device
  • Cloud Storage
  • always connected, data in cloud kit
  • share across all the devices
  • New Performance and Feature Baseline
  • Entire span of hardwire, dial back devices
  • More CPU and GPU power
  • Increase artwork resolution, model fidelity, visual effects
  • Universal Purchase, app on iOs and tvOS

##APPLE TV DESIGN GUIDELINES

  • engaging with content on screen in direct way
  • parallax effect make clear what happens on screen
  • people should instinctively know what to do

###Clear

  • single path through hierarchy, menu buttons always
  • optimal legibility at any viewing distance, across the room
  • Grid system includes a lot of padding for easy viewing

###Immersive

  • No distractions, make it all about the content
  • UI elements are removed as much as possible from view
  • Big canvas by doing edge to edge artwork

###Interactions with the Siri Remote

  • Touch surface, menu and remote features are available for developers
  • Touch surface can be used for games/typing
  • Play/pause button for playback shortcut or gaming controls
  • Menu is your Back button
  • Apple keynote, presentation quality
  • Accelerometer and Gyro information available for game control or align camera view
  • Use landscape mode if available

###Focus Model

  • Move in the expected direction of swipe
  • AirBnB browse through vacation rentals
  • State transitions: Unselected * Focused * Highlighted * Selected * Disabled
  • UI should make it clear what is focus and what is selected
  • Fit to the theme of your app/game
  • iOS tap is primary gesture.
  • Clicks instead of taps

##FOCUS DRIVEN INTERFACES WITH UIKIT

  • Interpret finger movement on remote
  • Determine the next view to be in focus
  • Detect which views are focusable
  • Move focus
  • Animate focus changes
  • Provide appearance for views

###Basics

  • UIKit view hierarchy
  • Focusable views
  • Always one view in focus
  • Extend search direction
  • Inital focus position with view controller

###Focus API

  • Focusable views: UIView and Subclasses
  • Defines preferred focus chain
  • Override to guide Focus Engine
  • Table and Collection Views have focusable rows and cells
  • There are ambiguous cases such as
  • focused view removed from view hierarchy

###Best practices

  • Collection Views do not implement focus by default
  • Parallax effect in UIImageView
  • Adding Coordinated Animations to respond to focus Changes
  • Using focus guides
  • Set preferred focus view based on where focus is currently

###Debugging

  • Can see visually what focus screen sees in Xcode

###Handle Button Presses

  • Edges of remote have controls UpArrow/LeftArrow/DownArrow
  • Detect regular touch gestures
  • UIResponder. Touch APIs are available start from center of focused view

###Summary

  • Adopt focus model and let Focus Engine handle interaction
  • Standard UIKit controls optimized to work with Focus Model
  • UIFocusEnvironment reference documentation

##SIRI REMOTE

###As a game controller

  • Control over
  • GCMicroGamePad Polling vs Event Callback
  • DPAD windowing, rotation
  • Menu button
  • Integrating with UIKit
  • GCEventViewController
  • Routes controller inputs, key to handling MENU button

###Device Rotation

  • Manually disable idle timer to prevent screen savers coming up during games
  • Already filtered
  • Accelerometer and gyroscope

###Input devices

  • Game controller controls are compatible between iOS and tvOS
  • Bluetooth game controllers can supplement the phone and remote
  • Use intentional gesture as a way to know whether to make hard switch

###Input Precedence

  • Take input from all if possible
  • Switch to most recently used
  • Watch for new connections
  • Allow player to select
  • Use whichever input "pressed start"

##MEDIA PLAYBACK on tvOS

  • AvFoundation and AvKit
  • AvPlayerViewController Native playback UI on tvOS
  • AVAsset represents a single media asset
  • Auth requests, custom url requests
  • AVPlayerViewController displays output from AVPlayer
  • AVPlayerItem externalMetadata can be used for title, description, genre, content rating and image
  • intersitialTimeRanges use for advertisements, prevent fast forward
  • Custom dismissal: Prevent auto-resume by setting current player item to nil
  • File based vs Streaming assets

HTTP Live Streaming

  • I-Frame only playlists are required
  • Captions/subtitles can be provided
  • Media stream validator

FairPlay Protected Streaming

  • A secure key delivery mecahanism
  • Content Key is protected on the network and on the client during playback
  • Industrial strength content protection for media

##tvML APPS

  • Browse, interact a catalogue of media content
  • Template system that can be dynamically populated with your content

###TVMLKit

  • Template based layout engine
  • Especially geared for media apps
  • Rapid development and moderate customizability
  • Leverage existing client-server architectures
  • Provide a native experience
  • Handling ratings, alerts for descriptions

###TVML Application Structure

  • Native App Code fires up app delegate

###TVMLKit

  • Presenting a TVML document
  • Navigation Document is the UINavigationController equivalent in TVML
  • Caching considerations, controlled using HTTP response header
  • Bridging from native to JavaScript
  • TVApplicationController ev
  • Template based layout engine for media apps

##ON DEMAND RESOURCES

  • When sb downloads app, they get the executable and base bundle
  • Dynamically load content into your app, provided as an OS level service on tvOS
  • Apple provides this from App Store
  • Intelligent content caching
  • Initial bundle is 200 mb but have access to 20GB
  • Asset pipelining can be done independently from XCode
  • No executable content

###Special Tag Categories

  • Initial install tags downloaded with initial purchase of app
  • prefetch starts downloading immediately after
  • Specify and relate how e.g. game levels relate to your on demand resources
  • NSBundleResourceRequest manages access to on-demand resources
  • Progress reporting and loading priority
  • Preservation priority

###Caching

  • ODR may be purged when storage space is low

###Data Storage

  • limited persistent local storage
  • Synchronizing with other devices, share content across persistent devices
  • Local storage is only NSUserDefaults, settings of app
  • KeyChain, little bits of sensitive data
  • iCloud and CloudKit for larger data
  • Temp data storage available via NSCaches Directory and NSTemporaryDirectory, subject to purging

##BEST PRACTICES FOR DESIGNING TVOS APPS

###Loading

  • Follow conventions on loading, avoid blank screens
  • load in background as much as possible

###Authentication

  • Try to avoid authentication
  • If need payment method/shipping address, need to do authentication
  • Identifying the current user is crucial
  • Allow browsing without logging on, only prompt to authenticate as late as possible
  • Request Info, make it logical why you need that information
  • Keep immersed in content and collect minimal info
  • Use the Email Field: Recently used can be used to prevent multi typing of emails
  • Refer people to the web/app for logging in to avoid involved onboarding
  • Make a companion app is good for complex apps
  • Include profile switching, make very clear who is signed in
  • Make restore purchases obvious

###Onboarding

  • Get out of the way, e.g. jump right into gameplay, make it intuitive
  • Show controls
  • Use appropriate language
  • Teach gradually and in context
  • Anticipate the need for help
  • Use the focus model instead of cursors

##TUNING YOUR tvOS APP

  • Reducing launch time
  • Reducing memory footprint
  • Optimizing resource usage
  • Ensuring smooth animation
  • Building responsive UI
  • Blended Pixels, use color blended pixels to identify
  • Explicitly set view opacity to unique
  • Avoid unnecessary text blending

###Images

  • Use Color Misaligned images to identify issues
  • Deliver appropriately sized assets
  • Avoid misaligned pixels

###Visual Effects

  • Use UIVisualEffect judiciously, on small regions
  • Make sure to avoid multiple effects

##THE TOP SHELF

  • Area of top row of effects on home screen
  • Static Image, Dynamic Content (served from server so can keep content current)

###Dynamic Content

  • Choice of Insert banners or a content row
  • Provide shortcuts to content
  • Can personalize dynamic content

APP STORE DISTRIBUTION AND MARKETING

###Business Models

  • Free/Paid, Freemium, Paymium
  • tvOS has a lot more Paid apps and also Freemium
  • Reach, revenue or both
  • Target market expectations, long sessions expected but frequent payment prompts are -ve

###Universal Purchase

  • Reach, revenue or both
  • Customer expectations
  • Content right limitations
  • Top markets are US, Japan, Sweden, Norway
  • Product page, icon, keywords, App store SEO
  • Use Apple approved TV image
  • Direct users towards search
  • Add icon imagery
  • Getting Featured: Understand process and reach out
  • Unique, engaging living room, intuitive use of Siri
  • Universal purchase, charge once for multi platform app.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment