Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Making apps for tv
Sally Shepard // @mostgood
1
One thing I hear a
lot is…
2
I want an Apple TV SDK
3
• What is the tv
• Making apps!
• Design considerations
• What the future might hold
X
What is tv?
5
*does not include hand
6
512 MB of RAM
8 GB of flash memory to cache content
7
Apple TV gives you access to the
best 1080p HD content —
including blockbuster films, hit TV
programmes, live sport, your
...
Device as a remote
8
9
tv features
• Home Sharing
• iCloud
• iTunes
• AirPlay
10
11
Focused on sharing
and watching.
12
If an SDK came out
tomorrow, what would you
make?
13
Making an tv app.
14

15
*holy grail*
16
How are these apps
made?
X
17
design
18
How does one navigate?
19
Apple remote
Remote app20
Collection View Table View
21
Coverflow-esque
Table View
22
Buttons
Labels, Text Views
Images
23
Ultra clear.
24
Would this work for
your app?
25
Controls
X
Class dump
http://nshipster.com/backrow/
X
Back Row UIKit
<BRResponder> <UIResponder>
<BRAppliance> <UIApplication>
BRController UIViewController
BRMenuController UI...
bad
*obligatory cat imageX
AirPlay
26
What is AirPlay?
X
Enabling AirPlay
• Mirroring
• Second screen
• Multi-user
• Controller
27
Mirroring
• No code needed
• Not optimised for TV screen
28
Second Screen
• Optimised for TV
• Same or related content as device
29
Multi-user
• Multi-player games
• Multi-user apps
• Each user can view their view in addition
to other users
30
Controller
• Main display on tv
• Device acts controller
31
Second Screen
UIWindow *window = !
[[UIApplication sharedApplication] keyWindow];
32
Second Screen
[UIScreen mainScreen]
33
Second Screen
1. Check for an external screen at app startup
2. Register for notifications for screen state changes
3. Cre...
Second Screen
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions...
Second Screen
// previous code!
[[NSNotificationCenter defaultCenter] addObserver:self !
selector:@selector(screenAdded:) ...
Second Screen
2. Register for notifications for screen state changes
- (void)screenAdded:(NSNotification *)screenNotificat...
Second Screen
3. Create a second window, link to a screen and display it
- (void)setupSecondScreen:(UIScreen *)newScreen {...
Second Screen
Things to remember
1. Notifications will queue when you’re app is in the background
so always add observers ...
Controller
Once you’ve setup a second screen and assigned
it a rootViewController, you can then change the
content on your...
Multiple Users
You can expand the experience to display content from multiple
users onto your second screen by using Game ...
Testing AirPlay
42
Testing in the simulator
43
44
Testing with devices
45
!!!
46
Design considerations
47
Screen sizes
48
TV screens are not for
reading.
49
You can use sound!
50
Video & images == "
51
Design like everyone
is looking.
52
The future of the tv
53
"Think how much your life has changed,
and all the things around you that have
changed, and yet TV, when you go into
the l...
Something will probably
happen, but who knows when
55
X
X
X
My wish list:
• Sign in with TouchID
• Notification Center
• Vision
• Siri
• HomeKit Hub
X
Routes
AirPlay

X
Summary:
• You don't need an SDK
• Relatively unexplored space
• 20 million+ sold
• New revenue possibilities
56
Thanks
@mostgood
57
Upcoming SlideShare
Loading in …5
×

Making apps for the Apple TV

656 views

Published on

Making apps for the Apple TV:
-What is the Apple TV?
-AirPlay
-Adding AirPlay support to iOS apps
-Testing AirPlay in the iOS simulator
-Design considerations

Video from NSScotland 2014 at: https://vimeo.com/album/3132071/video/111942376
Presented at NSScotland 2014 and LiDG November 2014

Published in: Software
  • Be the first to comment

  • Be the first to like this

Making apps for the Apple TV

  1. 1. Making apps for tv Sally Shepard // @mostgood 1
  2. 2. One thing I hear a lot is… 2
  3. 3. I want an Apple TV SDK 3
  4. 4. • What is the tv • Making apps! • Design considerations • What the future might hold X
  5. 5. What is tv? 5
  6. 6. *does not include hand 6
  7. 7. 512 MB of RAM 8 GB of flash memory to cache content 7
  8. 8. 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
  9. 9. Device as a remote 8
  10. 10. 9
  11. 11. tv features • Home Sharing • iCloud • iTunes • AirPlay 10
  12. 12. 11
  13. 13. Focused on sharing and watching. 12
  14. 14. If an SDK came out tomorrow, what would you make? 13
  15. 15. Making an tv app. 14
  16. 16.  15
  17. 17. *holy grail* 16
  18. 18. How are these apps made? X
  19. 19. 17
  20. 20. design 18
  21. 21. How does one navigate? 19
  22. 22. Apple remote Remote app20
  23. 23. Collection View Table View 21
  24. 24. Coverflow-esque Table View 22
  25. 25. Buttons Labels, Text Views Images 23
  26. 26. Ultra clear. 24
  27. 27. Would this work for your app? 25
  28. 28. Controls X
  29. 29. Class dump http://nshipster.com/backrow/ X
  30. 30. Back Row UIKit <BRResponder> <UIResponder> <BRAppliance> <UIApplication> BRController UIViewController BRMenuController UITableViewController BRControllerStack UINavigationController BRGridView UICollectionView BRListView UITableView X
  31. 31. bad *obligatory cat imageX
  32. 32. AirPlay 26
  33. 33. What is AirPlay? X
  34. 34. Enabling AirPlay • Mirroring • Second screen • Multi-user • Controller 27
  35. 35. Mirroring • No code needed • Not optimised for TV screen 28
  36. 36. Second Screen • Optimised for TV • Same or related content as device 29
  37. 37. Multi-user • Multi-player games • Multi-user apps • Each user can view their view in addition to other users 30
  38. 38. Controller • Main display on tv • Device acts controller 31
  39. 39. Second Screen UIWindow *window = ! [[UIApplication sharedApplication] keyWindow]; 32
  40. 40. Second Screen [UIScreen mainScreen] 33
  41. 41. 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
  42. 42. 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
  43. 43. 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
  44. 44. Second Screen 2. 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
  45. 45. Second Screen 3. 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
  46. 46. Second Screen Things 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
  47. 47. Controller Once 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
  48. 48. Multiple Users You 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 506 41
  49. 49. Testing AirPlay 42
  50. 50. Testing in the simulator 43
  51. 51. 44
  52. 52. Testing with devices 45
  53. 53. !!! 46
  54. 54. Design considerations 47
  55. 55. Screen sizes 48
  56. 56. TV screens are not for reading. 49
  57. 57. You can use sound! 50
  58. 58. Video & images == " 51
  59. 59. Design like everyone is looking. 52
  60. 60. The future of the tv 53
  61. 61. "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 Cook 54
  62. 62. Something will probably happen, but who knows when 55
  63. 63. X
  64. 64. X
  65. 65. X
  66. 66. My wish list: • Sign in with TouchID • Notification Center • Vision • Siri • HomeKit Hub X
  67. 67. Routes AirPlay  X
  68. 68. Summary: • You don't need an SDK • Relatively unexplored space • 20 million+ sold • New revenue possibilities 56
  69. 69. Thanks @mostgood 57

×