Top Banner
Making apps for tv Sally Shepard // @mostgood 1
69
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Making apps for the Apple TV

Making apps for tv

Sally Shepard // @mostgood

1

Page 2: Making apps for the Apple TV

One thing I hear a lot is…

2

Page 3: Making apps for the Apple TV

I want an Apple TV SDK

3

Page 4: Making apps for the Apple TV

• What is the tv

• Making apps!

• Design considerations

• What the future might hold

X

Page 5: Making apps for the Apple TV

What is tv?

5

Page 6: Making apps for the Apple TV

*does not include hand6

Page 7: Making apps for the Apple TV

512 MB of RAM

8 GB of flash memory to cache content

7

Page 8: Making apps for the Apple TV

Apple TV gives you access to the best 1080p HD content —

including blockbuster films, hit TV programmes, live sport, your

music, photos, videos and more — all on your high-definition TV. You can even play content from your iOS device or Mac on your

TV using AirPlay.X

Page 9: Making apps for the Apple TV

Device as a remote

8

Page 10: Making apps for the Apple TV

9

Page 11: Making apps for the Apple TV

tv features

• Home Sharing

• iCloud

• iTunes

• AirPlay

10

Page 12: Making apps for the Apple TV

11

Page 13: Making apps for the Apple TV

Focused on sharing and watching.

12

Page 14: Making apps for the Apple TV

If an SDK came out tomorrow, what would you

make?

13

Page 15: Making apps for the Apple TV

Making an tv app.

14

Page 16: Making apps for the Apple TV

15

Page 17: Making apps for the Apple TV

*holy grail*

16

Page 18: Making apps for the Apple TV

How are these apps made?

X

Page 19: Making apps for the Apple TV

17

Page 20: Making apps for the Apple TV

design

18

Page 21: Making apps for the Apple TV

How does one navigate?

19

Page 22: Making apps for the Apple TV

Apple remote

Remote app20

Page 23: Making apps for the Apple TV

Collection View Table View

21

Page 24: Making apps for the Apple TV

Coverflow-esqueTable View

22

Page 25: Making apps for the Apple TV

Buttons

Labels, Text ViewsImages

23

Page 26: Making apps for the Apple TV

Ultra clear.

24

Page 27: Making apps for the Apple TV

Would this work for your app?

25

Page 28: Making apps for the Apple TV

Controls

X

Page 29: Making apps for the Apple TV

Class dump

http://nshipster.com/backrow/

X

Page 30: Making apps for the Apple TV

Back Row UIKit

<BRResponder> <UIResponder>

<BRAppliance> <UIApplication>

BRController UIViewController

BRMenuController UITableViewController

BRControllerStack UINavigationController

BRGridView UICollectionView

BRListView UITableView

X

Page 31: Making apps for the Apple TV

bad

*obligatory cat imageX

Page 32: Making apps for the Apple TV

AirPlay

26

Page 33: Making apps for the Apple TV

What is AirPlay?

X

Page 34: Making apps for the Apple TV

Enabling AirPlay

• Mirroring

• Second screen

• Multi-user

• Controller

27

Page 35: Making apps for the Apple TV

Mirroring

• No code needed • Not optimised for TV screen

28

Page 36: Making apps for the Apple TV

Second Screen• Optimised for TV • Same or related content as device

29

Page 37: Making apps for the Apple TV

Multi-user

• Multi-player games • Multi-user apps • Each user can view their view in addition

to other users

30

Page 38: Making apps for the Apple TV

Controller• Main display on tv • Device acts controller

31

Page 39: Making apps for the Apple TV

Second Screen

UIWindow *window = ![[UIApplication sharedApplication] keyWindow];

32

Page 40: Making apps for the Apple TV

Second Screen

[UIScreen mainScreen]

33

Page 41: Making apps for the Apple TV

Second Screen

1. Check for an external screen at app startup

2. Register for notifications for screen state changes

3. Create a second window, link to a screen and display it.

34

Page 42: Making apps for the Apple TV

Second Screen

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {!//…!!

NSInteger screenCount = [[UIScreen screens] count];!if (screenCount > 1) {!

UIScreen *secondScreen = [[UIScreen screens] lastObject];![self setupSecondScreen:secondScreen];!

}!//...!

}

1. Check for an external screen at app startup

35

Page 43: Making apps for the Apple TV

Second Screen// previous code![[NSNotificationCenter defaultCenter] addObserver:self ! selector:@selector(screenAdded:) ! name:UIScreenDidConnectNotification ! object:nil]; !![[NSNotificationCenter defaultCenter] addObserver:self! selector:@selector(screenRemoved:)! name:UIScreenDidDisconnectNotification! object:nil];!//...

2. Register for notifications for screen state changes

36

Page 44: Making apps for the Apple TV

Second Screen2. Register for notifications for screen state changes

- (void)screenAdded:(NSNotification *)screenNotification {!UIScreen *newScreen = [screenNotification object];![self setupSecondScreen:newScreen];!

} !!- (void)screenRemoved:(NSNotification *)screenNotification {!

if (self.secondWindow) {!self.secondWindow.hidden = YES;!self.secondWindow = nil;!

}!}

37

Page 45: Making apps for the Apple TV

Second Screen3. Create a second window, link to a screen and display it

- (void)setupSecondScreen:(UIScreen *)newScreen {!CGRect windowBounds = newScreen.bounds;!if (!self.secondWindow) {! self.secondWindow = [UIWindow alloc]

initWithFrame:windowBounds];! self.secondWindow.screen = newScreen;! //setup UI content and add as rootViewController! self.secondWindow.hidden = NO;!}!

}

38

Page 46: Making apps for the Apple TV

Second ScreenThings to remember

1. Notifications will queue when you’re app is in the background so always add observers in an app lifetime object like AppDelegate.

2. To change the UIWindow attached to a UIScreen, hide the window first as it’s possible but an expensive operation.

3. Your second screen has no access to orientation information or notifications so use status bar orientation.

4. Use UIScreens availableModes to determine if a lower resolution is available for graphically intensive content

39

Page 47: Making apps for the Apple TV

ControllerOnce you’ve setup a second screen and assigned it a rootViewController, you can then change the content on your main screen to be a controller or other content.

*hands still not included

40

Page 48: Making apps for the Apple TV

Multiple UsersYou can expand the experience to display content from multiple

users onto your second screen by using Game Center API’s, or for non-game collaboration, the Multipeer Networking API’s

Game Center Bonjour

WWDC 2013 - Session 708WWDC 2013 - Session 50641

Page 49: Making apps for the Apple TV

Testing AirPlay

42

Page 50: Making apps for the Apple TV

Testing in the simulator

43

Page 51: Making apps for the Apple TV

44

Page 52: Making apps for the Apple TV

Testing with devices

45

Page 53: Making apps for the Apple TV

!!!46

Page 54: Making apps for the Apple TV

Design considerations

47

Page 55: Making apps for the Apple TV

Screen sizes

48

Page 56: Making apps for the Apple TV

TV screens are not for reading.

49

Page 57: Making apps for the Apple TV

You can use sound!

50

Page 58: Making apps for the Apple TV

Video & images == "

51

Page 59: Making apps for the Apple TV

Design like everyone is looking.

52

Page 60: Making apps for the Apple TV

The future of the tv

53

Page 61: Making apps for the Apple TV

"Think how much your life has changed, and all the things around you that have changed, and yet TV, when you go into the living room to watch TV or wherever

it may be, it almost feels like you're rewinding the clock and you've entered

a time capsule and you're going backwards.”

-Tim Cook54

Page 62: Making apps for the Apple TV

Something will probably happen, but who knows when

55

Page 63: Making apps for the Apple TV

X

Page 64: Making apps for the Apple TV

X

Page 65: Making apps for the Apple TV

X

Page 66: Making apps for the Apple TV

My wish list:• Sign in with TouchID

• Notification Center

• Vision

• Siri

• HomeKit Hub

X

Page 67: Making apps for the Apple TV

Routes

AirPlay

X

Page 68: Making apps for the Apple TV

Summary:• You don't need an SDK

• Relatively unexplored space

• 20 million+ sold

• New revenue possibilities

56

Page 69: Making apps for the Apple TV

Thanks@mostgood

57