Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CocoaHeads SKG #5 - Introduction to tvOS

CocoaHeads SKG #5 - Introduction to tvOS

The awesome @ipavelas makes a sweet introduction to tvOS

CocoaHeadsSKG

June 07, 2016
Tweet

More Decks by CocoaHeadsSKG

Other Decks in Programming

Transcript

  1. Intro to tvOS
    have they finally cracked it?
    @iPavleas

    View Slide

  2. What is it?
    Apps on TV
    Derived from iOS
    New frameworks TVML, TVJS
    Storage limitations
    New UX (Indirect input)

    View Slide

  3. Frameworks
    Accelerate
    AudioToolbox
    AudioUnit
    AVFoundation
    AVKit
    CFNetwork
    CloudKit
    CoreBluetooth
    CoreData
    CoreFoundation
    CoreGraphics
    CoreImage
    CoreLocation
    CoreMedia
    CoreSpotlight
    CoreText
    CoreVideo
    Darwin
    Foundation
    GameController
    GameKit
    GameplayKit
    GLKi
    ImageIO
    MachO
    MapKit
    MediaAccessibility
    MediaPlayer
    MediaToolbox
    Metal
    MetalKit
    MetalPerformanceShaders
    MobileCoreServices
    ModelIO
    OpenGLES
    SceneKit
    Security
    simd
    SpriteKit
    StoreKit
    Swift Standard Library
    SystemConfiguration
    UIKit

    View Slide

  4. No Photos
    No AddressBook
    No Contacts
    No MessageUI
    No ReplayKit
    No HomeKit

    View Slide

  5. No WebKit

    View Slide

  6. TVML
    XML, HTML like
    Templates (formTemplate, menuBarTemplate)
    Elements (title, img, button)

    View Slide

  7. View Slide

  8. View Slide

  9. View Slide

  10. TVJS
    JavaScript
    Standard DOM classes + EventListenerObject, Keyboard, NavigationDocument etc
    Can exist on a server
    Can bridge native code with JavaScript Core

    View Slide

  11. View Slide

  12. TVML vs Native
    Slower
    Less customisable
    Updates without app review
    Stock apps look like TVML

    View Slide

  13. NSUserDefaults (limited to 500KB)
    iCloud Key Value Storage (1MB per user, 1024 keys)
    CloudKit
    Own server
    Limited Persistent (local) Storage

    View Slide

  14. tvOS app bundle < 200MB

    View Slide

  15. New UX - Siri Remote
    “creates a unique, intimate connection with onscreen content”
    Focus
    Parallax images
    Gestures

    View Slide

  16. Focus Engine
    UIFocusEnvironment protocol
    UIView, UIViewController, UIWindow, UIPresentationController
    prefferedFocusView

    View Slide

  17. View Slide

  18. Focus Engine
    Swipe to move focus: left, right, up, down
    Internal picture of app’s UI
    should/
    didUpdateFocusInContext
    setNeedsFocusUpdate

    View Slide

  19. Focus Engine
    UIFocusGuide
    bottomAnchor, leftAnchor
    etc

    View Slide

  20. Gestures
    UITapGestureRecognizer:
    numberOfTaps, allowedPressTypes
    UILongPressGestureRecognizer:
    UISwipeGestureRecognizer:
    UIPanGestureRecognizer:

    View Slide

  21. No MultiTouch

    View Slide

  22. View Slide

  23. Existing Projects
    Standalone binary
    Universal purchase
    Share code with existing iOS apps
    Add new target
    New storyboards (1920x1080, scale 1x)
    TestFlight

    View Slide

  24. Thank you!

    View Slide