building apps for apple tv
Post on 12-Jan-2017
506 views
Embed Size (px)
TRANSCRIPT
Building Apps for Apple TVby David Olesch
DavidOlesch.com 1
Should you make an app for Apple TV?
DavidOlesch.com 2
In 2014, watching TV accounted for more than
half of leisure time.1
U.S. Bureau of Labor Statistics
DavidOlesch.com 3
Building Apps for Apple TV1. tvOS frameworks
2. Using open source libraries
3. Managing data on tvOS
4. Limitations of tvOS
5. tvOS design
DavidOlesch.com 4
Two options for writing code
DavidOlesch.com 5
tvOS inherits many frameworks from iOS
DavidOlesch.com 6
DavidOlesch.com 7
Does Cocoapods support the tvOS platform?
DavidOlesch.com 8
Not all Cocoapods libraries support the tvOS platform
DavidOlesch.com 9
If a library doesn't yet support tvOS (Step 1.)# LibraryName.podspec
s.tvos.deployment_target = '9.0'
DavidOlesch.com 10
If a library doesn't yet support tvOS (Step 2.)
DavidOlesch.com 11
If a library doesn't yet support tvOS (Step 3.)// SomeClass.m
#if TARGET_OS_IOS- (void)updateMotionEffectForOrientation:(UIInterfaceOrientation)orientation;#elif TARGET_OS_TV- (void)updateMotionEffect;#endif
DavidOlesch.com 12
Many open source libraries have been updated to work
with tvOS.
DavidOlesch.com 13
Local storage can be deleted at any time !
DavidOlesch.com 14
iCloud Key-Value Storelimited to 1MB // Writing to iCloud.
NSUbiquitousKeyValueStore *store = [NSUbiquitousKeyValueStore defaultStore]; if (store != nil) { [store setObject:object forKey:key]; [store synchronize]; }
DavidOlesch.com 15
iCloud Key-Value Storelimited to 1MB
// Reading from iCloud.
NSUbiquitousKeyValueStore *store = [NSUbiquitousKeyValueStore defaultStore]; id object = [store objectForKey:key];
DavidOlesch.com 16
Apple TV is controlled by the new Siri Remote
DavidOlesch.com 17
Building Apps for Apple TV1. tvOS frameworks
2. Using open source libraries
3. Managing data on tvOS
4. Limitations of tvOS
5. tvOS design
DavidOlesch.com 18
LimitationsNo push notifications
No app badges
No web views
DavidOlesch.com 19
Apple TV Designshould be primarily grid based
DavidOlesch.com 20
Take advantage of the Top Shelf
DavidOlesch.com 21
Take advantage of the Top Shelf
DavidOlesch.com 22
Take advantage of the Top Shelf#pragma mark - TVTopShelfProvider protocol
- (TVTopShelfContentStyle)topShelfStyle { return TVTopShelfContentStyleSectioned; //return TVTopShelfContentStyleInset;}- (NSArray *)topShelfItems { return @[[[TVContentItem alloc] init]];}
DavidOlesch.com 23
Questions?
DavidOlesch.com 24
Join me at the Apple TV Hackathon
Capital Factory 5th Floor
November 22nd 8:30 am - 7:30 pmDavidOlesch.com 25