building apps for apple tv
TRANSCRIPT
In 2014, watching TV accounted for more than half of leisure time.
1U.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
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 3.)// SomeClass.m
#if TARGET_OS_IOS- (void)updateMotionEffectForOrientation:(UIInterfaceOrientation)orientation;#elif TARGET_OS_TV- (void)updateMotionEffect;#endif
DavidOlesch.com 12
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
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
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