Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Bring your apps to the big screen 📺
Search
Boris Bügling
October 30, 2015
Programming
1
530
Bring your apps to the big screen 📺
An introduction to building tvOS apps, given at Swift Summit SF 2015.
Boris Bügling
October 30, 2015
Tweet
Share
More Decks by Boris Bügling
See All by Boris Bügling
Testing ⌚️ Apps and Other Extensions
neonichu
1
4.6k
Cross-platform Swift
neonichu
4
18k
Building better API clients in Swift
neonichu
1
280
Cross-platform Swift
neonichu
3
880
Swift Package Manager
neonichu
2
320
Swift Package Manager
neonichu
0
50
📺
neonichu
0
2k
Cross-Platform Swift
neonichu
0
74
Swift Package Manager
neonichu
6
4.3k
Other Decks in Programming
See All in Programming
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
190
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
24
12k
推し活としてのrails new/oshikatsu_ha_iizo
sakahukamaki
3
2k
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
310
開発効率向上のためのリファクタリングの一歩目の選択肢 ~コード分割~ / JJUG CCC 2024 Fall
ryounasso
0
420
Macとオーディオ再生 2024/11/02
yusukeito
0
330
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
4
570
Sidekiqで実現する 長時間非同期処理の中断と再開 / Pausing and Resuming Long-Running Asynchronous Jobs with Sidekiq
hypermkt
6
3k
プロジェクト新規参入者のリードタイム短縮の観点から見る、品質の高いコードとアーキテクチャを保つメリット
d_endo
1
1.1k
WEBエンジニア向けAI活用入門
sutetotanuki
0
330
Ethereum_.pdf
nekomatu
0
370
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
390
What's in a price? How to price your products and services
michaelherold
243
12k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9k
Building Applications with DynamoDB
mza
90
6.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
700
Facilitating Awesome Meetings
lara
49
6.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Happy Clients
brianwarren
97
6.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Transcript
BRING YOUR APP TO THE BIG SCREEN SWIFT SUMMIT, OCTOBER
2015 BORIS BÜGLING - @NEONACHO
None
COCOAPODS
CONTENTFUL
None
None
“‘I’d like to create an integrated television set that is
completely easy to use,’ he told me. [...] ‘It will have the simplest user interface you could imagine. I finally cracked it.’”
OCTOBER 21, 2011
SEPTEMBER 9, 2015
None
None
The future of TV is iOS
Accelerate AudioToolbox AudioUnit AVFoundation AVKit CFNetwork CloudKit CoreBluetooth CoreData CoreFoundation
CoreGraphics
CoreImage CoreLocation CoreMedia CoreSpotlight CoreText CoreVideo Darwin Foundation GameController GameKit
GameplayKit
GLKit ImageIO MachO MediaAccessibility MediaPlayer MediaToolbox Metal MetalKit MetalPerformanceShaders MobileCoreServices
ModelIO OpenGLES SceneKit Security simd SpriteKit StoreKit Swift Standard Library
SystemConfiguration UIKit
WEBKIT
MULTIPEERCONNE CTIVITY
PORTING EXISTING APPS
COCOAPODS ▸ Supports tvOS since 0.39.0 ▸ New platform: platform
:tvos, '9.0'
PODS SUPPORTING TVOS ["AFNetworking","Alamofire","CocoaLumberjack","SwiftyJSON","Charts", "Quick","Bolts","SnapKit","RxBlocking","RxCocoa","RxSwift","Nimble", "Argo","UICKeyChainStore","AsyncSwift","DTFoundation","Sync", "KeychainAccess","upnpx","AlamofireImage"] If you are
adventurous ! https://github.com/orta/cocoapods-expert-difficulty
SPRITEKIT EXAMPLE
DOOM CLASSIC ▸ UIKit changes (UIAlertView, UISlider) ▸ AudioSession isn't
available ▸ Newer C++ compiler
NIBS ! If you feel like copy-pasting stuff between NIBs
! https://github.com/neonichu/DOOM-IOS2/tree/tvos
STORAGE LIMITATIONS ▸ app is limited to 200 MB ▸
500 KB of persistent storage (NSUserDefaults) ▸ Use iCloud ▸ Use On-Demand resources
NO DIRECT MANIPULATION
FOCUS ENGINE UIButton().canBecomeFocused() // == true or false UIButton().focused //
== true or false UIScreen.mainScreen().focusedView // nil or the view in focus
REACTING TO FOCUS CHANGES func didUpdateFocusInContext(context: UIFocusUpdateContext, withAnimationCoordinator coordinator: UIFocusAnimationCoordinator)
context.nextFocusedView // the view which gets the focus context.previouslyFocusedView // the view which had the focus func addCoordinatedAnimations(_ animations: (() -> Void)?, completion completion: (() -> Void)?)
DEMO
SIRI?
GAME CONTROLLERS
None
NSNotificationCenter.defaultCenter().addObserverForName(GCControllerDidConnectNotification, object: nil, queue: nil) { (note) in if let
controller = note.object as? GCController { if let microPad = controller.microGamepad { microPad.dpad.valueChangedHandler = { (_, x, y) in if let paddle = self.childNodeWithName("Paddle") { paddle.position.y += CGFloat(y) } } } } }
GAME CONTROLLERS WORK WITH UIKIT COMPONENTS
SIRI REMOTE IS ALSO A GAME CONTROLLER ▸ Profile GCMicroGamepad
▸ Touch surface is a dpad ▸ Two action buttons ▸ Motion (GCMotion) ▸ Seems not to work in the simulator
2.27 If your app’s core functionality doesn’t work with the
Siri remote it will be rejected. The app may, however, provide enhanced functionality in connection with a game controller or other peripheral
A maximum of two game controllers (plus one remote) can
be connected to an Apple TV at any given time.
DEMO
TVML
APP REVIEW !
CONCLUSION ▸ tvOS works very well ▸ If you know
UIKit, it's easy to start ▸ Think about interaction
RESOURCES ▸ https://developer.apple.com/tvos/human-interface-guidelines/ ▸ "Ich glotz TV", @avbelow, Macoun 2015
▸ https://github.com/contentful/tvful ▸ http://nerds.airbnb.com/tvos-focus-engine/ ▸ https://eternalstorms.wordpress.com/2015/10/05/pair-the-apple- tv-developer-kit-siri-remote-with-xcodes-simulator/
THANKS!
@NeoNacho
[email protected]
http://buegling.com/talks