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
tvOS for the iOS developer
Search
Josh Brown
November 02, 2015
Programming
0
130
tvOS for the iOS developer
An overview of the similarities and differences between developing for tvOS and iOS
Josh Brown
November 02, 2015
Tweet
Share
Other Decks in Programming
See All in Programming
GitHub Copilot Tips and Tricks
yuichielectric
26
7.5k
AppDeveloperCon 2024 EU: Building polyglot developer experiences in 2024
salaboy
0
380
Honoとhtmx
yusukebe
6
1.2k
上手な探索的テストとその上達方法について
matsu802
4
660
object-oriented-conference-2024
fuwasegu
6
2k
Some Quick Ideas To Improve Your Tests ( #jassttokyo )
teyamagu
PRO
2
2.3k
C# 大統一理論推進委員会 会員のための Unity Package Manager プロジェクト構成案
monry
PRO
0
580
Creating Retro-Style Photos Using Swift
ski
1
370
【KMC春合宿2024】実装視点で見るNeural Radiance Fields
runningoutrate
0
150
TCA魔法学入門🪄
dazy
0
280
TDDと今まで
kanayannet
0
140
OpenAPI を守るのは難しい
ohmori_yusuke
2
150
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
215
8.5k
For a Future-Friendly Web
brad_frost
170
8.9k
How To Stay Up To Date on Web Technology
chriscoyier
781
250k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
219
21k
Infographics Made Easy
chrislema
237
18k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.8k
Building Your Own Lightsaber
phodgson
97
5.6k
WebSockets: Embracing the real-time Web
robhawkes
59
6.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
350
18k
Fashionably flexible responsive web design (full day workshop)
malarkey
397
65k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
11
1.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
226
16k
Transcript
tvOS for the iOS developer
What's similar to iOS? → everything → Xcode, Interface Builder,
Objective-C, Swift → frameworks (UIKit, Metal, CloudKit, Game Center, and more)
What's different from iOS? → user interaction (Siri remote) →
focus engine → a few missing parts → the App Store and assets → (new) TVML, JavaScript, TVMLKit → views & view controller appearance
User interaction
None
None
Remote
None
Focus
"A UI element is in focus when the user highlights
an item, but has not selected an item."
Focus → UIFocusGuide → Adam made some awesome slides
None
What do these have in common? → Photos framework →
Multipeer Connectivity → EventKit → local storage → web views
Storage → no persistent local storage → NSUserDefaults: 500K →
CloudKit
None
App Store: Required Assets → Layered icons: App Store, Home
screen → Top Shelf Image → Launch image → Screen shots
Parallax on tv → app icons → movies → TV
shows
Layered icon Three layers → Front → Middle → Back
Layered icon Two sizes → Large: 1280 x 768 →
Small: 400 x 240
Top Shelf image
None
Capture (just like iOS) → Screen shots: Xcode → Video:
QuickTime Player
None
Views & View Controllers UIKitCatalog
None
TVML
TVML and JavaScript "client-server apps whose primary purpose is to
stream media"
Why TVML? you can change stuff after it's deployed
TVML Architecture
None
TVML and JavaScript 1. write some TVML (XML) & JavaScript
2. put it on your server 3. write a TVMLKit app that points to your server 4. submit your TVMLKit app to Apple
None
<document> <mainTemplate> <background> <img src="path to images on your server/Car_Movie_1920x1080"
/> </background> <menuBar> <section> <menuItem> <title>PLAY</title> </menuItem> <menuItem> <title>SCENES</title> </menuItem> <menuItem> <title>EXTRAS</title> </menuItem> </section> </menuBar> </mainTemplate> </document>
// application.js doc.addEventListener("play", startPlayback); // ... function startPlayback(event) { var
player = new Player(); // ... player.playlist.push(video); // ... player.play(); }
class AppDelegate: UIResponder, UIApplicationDelegate, TVApplicationControllerDelegate { var appController: TVApplicationController? static
let TVBaseURL = "http://localhost:9001/" static let TVBootURL = "\(AppDelegate.TVBaseURL)js/application.js" func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // ... let appControllerContext = TVApplicationControllerContext() if let javaScriptURL = NSURL(string: AppDelegate.TVBootURL) { appControllerContext.javaScriptApplicationURL = javaScriptURL } appControllerContext.launchOptions["BASEURL"] = AppDelegate.TVBaseURL appController = TVApplicationController(context: appControllerContext, window: window, delegate: self) // ... }
thanks
Questions? @jtbrown
Further Reading tv Human Interface Guidelines 200MB Max, No Storage,
No Web Views: Is tvOS the Future of Apps? Beginning tvOS Development with TVML Tutorial