55
tvOS Perks and Pitfalls Axel Roest The App Academy do{iOS} 2015

tvOS Perks and Pitfalls

Embed Size (px)

Citation preview

Page 1: tvOS Perks and Pitfalls

tvOSPerks and Pitfalls

Axel Roest The App Academy

do{iOS} 2015

Page 2: tvOS Perks and Pitfalls

whoami

Page 3: tvOS Perks and Pitfalls

whoami

Page 4: tvOS Perks and Pitfalls

Happy We got one of the $1 dev. kits

Page 5: tvOS Perks and Pitfalls

Happy We got one of the $1 dev. kits

Page 6: tvOS Perks and Pitfalls

Fun

Page 7: tvOS Perks and Pitfalls

images © ifixit

Dual-core 64-bit Apple A8 chip

2 GB RAM 32 or 64 GB Flash

Page 8: tvOS Perks and Pitfalls

Rumours„Oh, it’s just web apps”

Page 9: tvOS Perks and Pitfalls

2different technologies

Page 10: tvOS Perks and Pitfalls

TVML TVJS2different technologies

iOS traditional

code

Page 11: tvOS Perks and Pitfalls

TVML TVJS2different technologies

iOS traditional

code

Page 12: tvOS Perks and Pitfalls

Twofold opportunities

• iOS devs can reuse their knowledge

• web devs can reuse their js+xml knowledge

Page 13: tvOS Perks and Pitfalls

Twofold opportunities

• iOS devs can reuse their knowledge

• web devs can reuse their js+xml knowledge

Shhhh! Please don’t tell

your web friends this!

Page 14: tvOS Perks and Pitfalls

Anatomy of the Apple TV

home screen

Page 15: tvOS Perks and Pitfalls

top row

TVContentItemTopShelf

rest of apps

Page 16: tvOS Perks and Pitfalls

top row

TVContentItemTopShelf

rest of apps

Page 17: tvOS Perks and Pitfalls

top row

TVContentItemTopShelf

rest of appsin Focus

Page 18: tvOS Perks and Pitfalls
Page 19: tvOS Perks and Pitfalls
Page 20: tvOS Perks and Pitfalls

un Focus ed

Page 21: tvOS Perks and Pitfalls

un Focus ed

Page 22: tvOS Perks and Pitfalls

Anatomy of an app

Two targets:

• TVTopShelfProvider ➔ [TVContentItem]

• Your App ➔

Page 23: tvOS Perks and Pitfalls

Anatomy of an app

Two targets:

• TVTopShelfProvider ➔ [TVContentItem]

• Your App ➔

Page 24: tvOS Perks and Pitfalls

tvOS

Page 25: tvOS Perks and Pitfalls

diff iOS tvOS

• No persistent storage ➔ iCloud only

• 200 MB limit ➔ on-demand resources

• Focus Engine

• No specific iOS frameworks

Page 26: tvOS Perks and Pitfalls

diff iOS tvOS

• No persistent storage ➔ iCloud only

• 200 MB limit ➔ on-demand resources

• Focus Engine

• No specific iOS frameworks

– Contacts HealthKit

CoreMotion Accounts

Page 27: tvOS Perks and Pitfalls

diff iOS tvOS

• No persistent storage ➔ iCloud only

• 200 MB limit ➔ on-demand resources

• Focus Engine

• No specific iOS frameworks

– Contacts HealthKit

CoreMotion Accounts

+ TVServices

TVMLKit

Page 28: tvOS Perks and Pitfalls

Weirdly missing

• HomeKit

• MapKit

• ReplayKit

• VideoToolbox

Page 29: tvOS Perks and Pitfalls

Weirdly missing

• HomeKit

• MapKit

• ReplayKit

• VideoToolbox

Page 30: tvOS Perks and Pitfalls

why no Webkit?

Page 31: tvOS Perks and Pitfalls

WebKit Alternatives

• Create your own layoutengine (NetNewsWire)

• Hack it for your own personal use https://github.com/jvanakker/tvOSBrowser

Page 32: tvOS Perks and Pitfalls

code is easy

• Add a tvos target

• Add new UIViewControllers

• Run

Page 33: tvOS Perks and Pitfalls

ux redesign

• UX is a whole new ballgame

• Rethink interaction

• No touch screen: less typing

• new layered icons

Page 34: tvOS Perks and Pitfalls

ux redesign

• UX is a whole new ballgame

• Rethink interaction

• No touch screen: less typing

• new layered icons

Page 35: tvOS Perks and Pitfalls

Parallax Previewer

Page 36: tvOS Perks and Pitfalls

Parallax Previewer

Page 37: tvOS Perks and Pitfalls

• Difference LSR and LCR files

• Creating in Xcode: drag & export

• create LCR file using layerutil, which converts LSR to LCR.

• LCRs can be used within UIImageviews

• unfortunately, no reverse version of layerutil yet

Page 38: tvOS Perks and Pitfalls

Gotchas w.r.t. iconsyou need 3 icon layers!

no transparency in back layer

Page 39: tvOS Perks and Pitfalls

Gotchas w.r.t. icons

Large-AppIconScratch-.xcassets: The last image stack layer with content, "Back", must be a fully opaque bitmap. The pixel at position (602, 475) has an alpha value of 26.

Xcode compiler error:

you need 3 icon layers! no transparency in back layer

Page 40: tvOS Perks and Pitfalls

TVJS TVML

Page 41: tvOS Perks and Pitfalls

TVML app• Client-Server

• Written in ‘TVJS’, a javascript framework

• AppDelegate contains URL

• start TVApplicationController

• Use standard web techniques for deployment, analytics, A/B testing etc.

Page 42: tvOS Perks and Pitfalls

TVML

• you can now totally change an app after you went through the app approval phase.

• ideal for existing web based content

• Tons of standard TVML templates for e.g. alerts, lists, photo stacks

Page 43: tvOS Perks and Pitfalls
Page 44: tvOS Perks and Pitfalls

but wait!

You can also put TVML applications

inside UIViewControllers!

Page 45: tvOS Perks and Pitfalls

pitfalls

Page 46: tvOS Perks and Pitfalls

Remember to buy

yet another USB cable

Page 47: tvOS Perks and Pitfalls

Remote

Simulator remote works, but not really well

(But you can connect the Siri remote to the simulator!)

Page 48: tvOS Perks and Pitfalls

Really easy to test TVML app

python server

however (due to caching?): for each new js tweak you need to reload the app from Xcode. Killing it doesn’t seem to work

Page 49: tvOS Perks and Pitfalls

No local storage (!)apart from NSUserDefaults

➔ iCloud KVS (< 1MB) and CloudKit

➔ On-Demand Resources

Page 50: tvOS Perks and Pitfalls

Asset placementand ease of use

no handy keyboard

Page 51: tvOS Perks and Pitfalls
Page 52: tvOS Perks and Pitfalls

perks

Page 53: tvOS Perks and Pitfalls

perks

• iOS app ➔ tvOS

• online content ➔ TVML + TVJS

Page 54: tvOS Perks and Pitfalls

So many toys, so little time

Page 55: tvOS Perks and Pitfalls

The end

[email protected] • @axello