SlideShare a Scribd company logo
Introduction
to tvOS app
development
- Snehal Patil
Apps that reveal
tvOS Potential!
Anatomy of Apple TV
Home Screen
Choose your programming style
● TVML Apps:
○ The first uses an entirely new process utilizing TVML, TVJS and TVMLKit. TVML is a form of
XML and stands for “Television Markup Language”.
○ TVJS is set of JavaScript APIs which provide you with the means to display apps created with
TVML.
○ TVMLKit is the glue between TVML, JavaScript, and your native tvOS application.
● Custom Apps:
○ The second uses familiar iOS frameworks and concepts you know and love like Storyboards,
UIKit, and Auto Layout.
○ Leverage many of the same frameworks, technologies, and concepts that you are already
familiar developing with for iOS.
TVOS UICollectionView and Detail view demo
tvOS Simulator and Remote
● Touch Surface
● Buttons
● Microphone
● Gyroscope
Focus
● Preferred Focus Environments
○ canBecomeFocused()
○ Focus Engine APIs
■ isEnabled automatically changes the Focus property
■ restoresFocusAfterTransition
■ Focus API gives us full control over how the views can interact with each other and with
the UX
https://developer.apple.com/videos/play/wwdc2016/215/?time=2103
Parallax
● Creating Parallax image
(https://developer.apple.com/library/tvos/documentation/General/Conceptual/AppleTV_PG/CreatingParallaxArtwork.html#//apple_r
ef/doc/uid/TP40015241-CH19-SW1)
● Parallax Previewer
Detail View
Top Shelf - more than “second app icon”
● Content showcase area above the top row of apps on the Apple TV Home
screen
● The user can decide which apps are in the top row. When one of these apps
is brought into focus, the top shelf displays featured content specific to that
app.
● Unique opportunity for your app to highlight new, featured, or useful content
and let the user jump directly to it.
Static Top Shelf
Top Shelf Image
Dynamic Content
● Interactive top shelf
● Choice of Inset Banner or Content Row
● Provides shortcuts to the content
● Can be personalized
Inset top shelf
● great choice to
display the
overarching themes
of your app
● Both layouts let the
user scroll and
browse through the
your content
● For ex: Game app
Sectioned top shelf
● Great choice to show
grouped Information
● Feed information as
quickly as possible
● For ex: New articles
Let's Learn how to add top shelf ! -
● Download code from https://github.com/patilsnehal/tvOSTopShelf
● Run the project - News app
● Add a target to this project
TV Services Extension
Principle Class - ServiceProvider
● ServiceProvider.swift should be created automatically for you
● TVTopShelfProvider protocol
● TVTopShelfContentStyle - Sectioned / Inset
● TVContentItem array - actual metadata
○ Content identifier
○ Title
○ Imageurl
○ imageShape
○ Display url
○ Play url
○ topshelfItem
TVContentItem
topShelfItem
var topShelfItems: [TVContentItem] {
// 1
let breakingNewsIdentifier = TVContentIdentifier(identifier:
"Breaking News", container: nil)!
let breakingNewsSection = TVContentItem(contentIdentifier:
breakingNewsIdentifier)!
breakingNewsSection.title = "Breaking News"
// 2
let martianRiotIdentifier = TVContentIdentifier(identifier:
"Martians Riot", container: nil)!
let martianRiotItem = TVContentItem(contentIdentifier:
martianRiotIdentifier)!
// 3
breakingNewsSection.topShelfItems = [martianRiotItem]
return [breakingNewsSection]
}
Running the top shelf
NewsApp and TopShelf
Add image for topshelf
ImageURL
martianRiotItem.imageURL =
NSBundle.mainBundle().URLForResource(
"sectionedMartians", withExtension:
"png")
Adding more news items
// 1
let milkyWayNewsIdentifier = TVContentIdentifier(identifier:
"Milky Way News", container: nil)!
let milkyWaySection = TVContentItem(contentIdentifier:
milkyWayNewsIdentifier)!
milkyWaySection.title = "Milky Way"
// 2
let cometIdentifier = TVContentIdentifier(identifier:
"An odd comet", container: nil)!
let cometItem = TVContentItem(contentIdentifier:
cometIdentifier)!
cometItem.imageURL = NSBundle.mainBundle().URLForResource(
"comet", withExtension: "png")
// 3
let asteroidIdentifier = TVContentIdentifier(identifier:
"Asteroid Light Speed", container: nil)!
let asteroidItem = TVContentItem(contentIdentifier:
asteroidIdentifier)!
asteroidItem.imageURL = NSBundle.mainBundle().URLForResource(
"asteroid", withExtension: "png")
// 4
milkyWaySection.topShelfItems = [cometItem, asteroidItem]
return [breakingNewsSection, milkyWaySection]
Mulitple Section in top shelf
Adding User Interaction
● Unfortunately you can not call IBAction event handling
● AppDelegate.swift will call application:openURL:options when a user selects
anything in the top shelf
● Provide displayURL for detail view
● Provide playURL to direct playback or launch into action
● The top shelf can listen to two events on the remote: a press on the touch
screen, and a press on the play button.
● Add custom url scheme to your app’s Info.plist file
Event Handling
plist file modification
Hooking up the AppDelegate
Adding the URLs
martianRiotItem.displayURL = urlForIdentifier("martianRiot")
cometItem.displayURL = urlForIdentifier("comet")
asteroidItem.displayURL = urlForIdentifier("asteroid")
Helper Method
private func urlForIdentifier(identifier: String) -> NSURL {
let components = NSURLComponents()
components.scheme = "newsapp"
components.queryItems = [NSURLQueryItem(name: "identifier",
value: identifier)]
return components.URL!
}
Appdelegate.swift
let newsTab = 0
let martianTab = 1
let earthTab = 2
let milkyWayTab = 3
func application(app: UIApplication, openURL url: NSURL,
options: [String: AnyObject]) -> Bool {
guard let initialViewController = window?.rootViewController
as? UITabBarController else { return false }
switch url.absoluteString {
case "newsapp:?identifier=martianRiot":
initialViewController.selectedIndex = martianTab
case "newsapp:?identifier=comet",
"newsapp:?identifier=asteroid":
initialViewController.selectedIndex = milkyWayTab
default:
return false
}
return true
}
Tips and Tricks
● Provide both displayURL and playURL
● Post TVTopShelfItemsDidChangeNotification
● Use NSUserDefaults and set up App Group to share data between app and
extension
Managing Resources - iCloud and ODR
● Storage on Apple TV is limited < 200MB
● No guarantee that information stored on the device will be available the next time a user opens your
app
● Need to store user information somewhere else than Apple TV so that it can be accessed by our
application on other devices
● iCloud Key-Value Storage (KVS) and CloudKit.
● 1M < use iCloud KVS. iCloud KVS automatically synchronizes information across all of a user’s
devices. Only the owner of the app is able to access the information stored by iCloud KVS.
● 1MB > use CloudKit. CloudKit allows information stored by one user to be accessed by another
user.
On Demand Resources
● tvOS apps have a maximum initial download size of 200 MB, and any additional resources must be
available through ODR.
● Only retrieves the resources it’s needed up to that point. (For ex. Download resources for level 1
game)
● Why to use ODR?
○ Faster initial download
○ Smaller app size
Level 1 Bundle tag1
Level 2 Bundle tag2
App
References
● https://www.raywenderlich.com
● https://www.youtube.com/watch?v=k4pSxlEnFqM&index=1&list=PLiRG83hKoub9vYDmeyXh50U9Z
YbNJ6PZF
● https://developer.apple.com/library/tvos/documentation/General/Conceptual/AppleTV_PG/YourFirst
AppleTVApp.html
● https://developer.apple.com/videos/techtalks-apple-tv/
Q & A
Thank you!

More Related Content

What's hot

Developing windows 10 universal apps
Developing windows 10 universal appsDeveloping windows 10 universal apps
Developing windows 10 universal apps
Chris Dufour
 
Wwdc2019
Wwdc2019Wwdc2019
Wwdc2019
Prabin Datta
 
Mobile HTML5 Web Apps - Codemotion 2012
Mobile HTML5 Web Apps - Codemotion 2012Mobile HTML5 Web Apps - Codemotion 2012
Mobile HTML5 Web Apps - Codemotion 2012
marcocasario
 
Wikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGapWikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGap
Ted Chien
 
Mobile Development with Adobe AIR
Mobile Development with Adobe AIRMobile Development with Adobe AIR
Mobile Development with Adobe AIR
easelsolutions
 
[Gokathon 2017] Video Highlight Creating Tool using TV rating and face recogn...
[Gokathon 2017] Video Highlight Creating Tool using TV rating and face recogn...[Gokathon 2017] Video Highlight Creating Tool using TV rating and face recogn...
[Gokathon 2017] Video Highlight Creating Tool using TV rating and face recogn...
Minwook Chang
 
App forum2015 London - Building RhoMobile Applications with Ionic
App forum2015 London - Building RhoMobile Applications with IonicApp forum2015 London - Building RhoMobile Applications with Ionic
App forum2015 London - Building RhoMobile Applications with Ionic
robgalvinjr
 
Ignite template f11fritzandmichelle
Ignite template f11fritzandmichelleIgnite template f11fritzandmichelle
Ignite template f11fritzandmichelle
fritzloewy
 
28 ways To Create Awesome Blog Content with an iPhone
28 ways To Create Awesome Blog Content with an iPhone28 ways To Create Awesome Blog Content with an iPhone
28 ways To Create Awesome Blog Content with an iPhone
Converse Digital | Digital Strategy Advisors
 
ゲーム作成で学ぶ iPhoneアプリケーション超入門
ゲーム作成で学ぶ iPhoneアプリケーション超入門ゲーム作成で学ぶ iPhoneアプリケーション超入門
ゲーム作成で学ぶ iPhoneアプリケーション超入門
SwapSkills
 
Introduction to the Amazon Appstore
Introduction to the Amazon AppstoreIntroduction to the Amazon Appstore
Introduction to the Amazon Appstore
Amazon Appstore Developers
 
Building apps for multiple devices
Building apps for multiple devicesBuilding apps for multiple devices
Building apps for multiple devices
Terry Ryan
 
Developing Android Applications for Google TV - Android Developer Lab 2011
Developing Android Applications for Google TV - Android Developer Lab 2011Developing Android Applications for Google TV - Android Developer Lab 2011
Developing Android Applications for Google TV - Android Developer Lab 2011
Paris Android User Group
 
Voice interfaces
Voice interfacesVoice interfaces
Voice interfaces
Sam Machin
 
iPhone Developer_ankush
iPhone Developer_ankushiPhone Developer_ankush
iPhone Developer_ankush
ankush Ankush
 
Hybrid app development with ionic
Hybrid app development with ionicHybrid app development with ionic
Hybrid app development with ionic
Wan Muzaffar Wan Hashim
 
Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)
Mark Leusink
 
Beginning iOS Development with Swift
Beginning iOS Development with SwiftBeginning iOS Development with Swift
Beginning iOS Development with Swift
TurnToTech
 
Titanium Appcelerator - Beginners
Titanium Appcelerator - BeginnersTitanium Appcelerator - Beginners
Titanium Appcelerator - Beginners
Ambarish Hazarnis
 
Desarrollo AIR Mobile
Desarrollo AIR MobileDesarrollo AIR Mobile
Desarrollo AIR Mobile
Saúl Buentello
 

What's hot (20)

Developing windows 10 universal apps
Developing windows 10 universal appsDeveloping windows 10 universal apps
Developing windows 10 universal apps
 
Wwdc2019
Wwdc2019Wwdc2019
Wwdc2019
 
Mobile HTML5 Web Apps - Codemotion 2012
Mobile HTML5 Web Apps - Codemotion 2012Mobile HTML5 Web Apps - Codemotion 2012
Mobile HTML5 Web Apps - Codemotion 2012
 
Wikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGapWikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGap
 
Mobile Development with Adobe AIR
Mobile Development with Adobe AIRMobile Development with Adobe AIR
Mobile Development with Adobe AIR
 
[Gokathon 2017] Video Highlight Creating Tool using TV rating and face recogn...
[Gokathon 2017] Video Highlight Creating Tool using TV rating and face recogn...[Gokathon 2017] Video Highlight Creating Tool using TV rating and face recogn...
[Gokathon 2017] Video Highlight Creating Tool using TV rating and face recogn...
 
App forum2015 London - Building RhoMobile Applications with Ionic
App forum2015 London - Building RhoMobile Applications with IonicApp forum2015 London - Building RhoMobile Applications with Ionic
App forum2015 London - Building RhoMobile Applications with Ionic
 
Ignite template f11fritzandmichelle
Ignite template f11fritzandmichelleIgnite template f11fritzandmichelle
Ignite template f11fritzandmichelle
 
28 ways To Create Awesome Blog Content with an iPhone
28 ways To Create Awesome Blog Content with an iPhone28 ways To Create Awesome Blog Content with an iPhone
28 ways To Create Awesome Blog Content with an iPhone
 
ゲーム作成で学ぶ iPhoneアプリケーション超入門
ゲーム作成で学ぶ iPhoneアプリケーション超入門ゲーム作成で学ぶ iPhoneアプリケーション超入門
ゲーム作成で学ぶ iPhoneアプリケーション超入門
 
Introduction to the Amazon Appstore
Introduction to the Amazon AppstoreIntroduction to the Amazon Appstore
Introduction to the Amazon Appstore
 
Building apps for multiple devices
Building apps for multiple devicesBuilding apps for multiple devices
Building apps for multiple devices
 
Developing Android Applications for Google TV - Android Developer Lab 2011
Developing Android Applications for Google TV - Android Developer Lab 2011Developing Android Applications for Google TV - Android Developer Lab 2011
Developing Android Applications for Google TV - Android Developer Lab 2011
 
Voice interfaces
Voice interfacesVoice interfaces
Voice interfaces
 
iPhone Developer_ankush
iPhone Developer_ankushiPhone Developer_ankush
iPhone Developer_ankush
 
Hybrid app development with ionic
Hybrid app development with ionicHybrid app development with ionic
Hybrid app development with ionic
 
Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)
 
Beginning iOS Development with Swift
Beginning iOS Development with SwiftBeginning iOS Development with Swift
Beginning iOS Development with Swift
 
Titanium Appcelerator - Beginners
Titanium Appcelerator - BeginnersTitanium Appcelerator - Beginners
Titanium Appcelerator - Beginners
 
Desarrollo AIR Mobile
Desarrollo AIR MobileDesarrollo AIR Mobile
Desarrollo AIR Mobile
 

Viewers also liked

tvOS
tvOStvOS
Developing for Apple TV
Developing for Apple TVDeveloping for Apple TV
Developing for Apple TV
alekseyn
 
Learn about iOS10 Siri Kit
Learn about iOS10 Siri KitLearn about iOS10 Siri Kit
Learn about iOS10 Siri Kit
Snehal Patil
 
Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"
Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"
Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"
Lviv Startup Club
 
Develop apps for (Apple) TV
Develop apps for (Apple) TVDevelop apps for (Apple) TV
Develop apps for (Apple) TV
Codemotion
 
AbemaTV on tvOS
AbemaTV on tvOSAbemaTV on tvOS
AbemaTV on tvOS
Yuji Hato
 
Apple TV UX: 8 Guidelines for greater Apps
Apple TV UX: 8 Guidelines for greater Apps Apple TV UX: 8 Guidelines for greater Apps
Apple TV UX: 8 Guidelines for greater Apps
CELLULAR
 
Building a tvOS Application
Building a tvOS ApplicationBuilding a tvOS Application
Building a tvOS Application
Michiel De Mey
 

Viewers also liked (8)

tvOS
tvOStvOS
tvOS
 
Developing for Apple TV
Developing for Apple TVDeveloping for Apple TV
Developing for Apple TV
 
Learn about iOS10 Siri Kit
Learn about iOS10 Siri KitLearn about iOS10 Siri Kit
Learn about iOS10 Siri Kit
 
Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"
Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"
Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"
 
Develop apps for (Apple) TV
Develop apps for (Apple) TVDevelop apps for (Apple) TV
Develop apps for (Apple) TV
 
AbemaTV on tvOS
AbemaTV on tvOSAbemaTV on tvOS
AbemaTV on tvOS
 
Apple TV UX: 8 Guidelines for greater Apps
Apple TV UX: 8 Guidelines for greater Apps Apple TV UX: 8 Guidelines for greater Apps
Apple TV UX: 8 Guidelines for greater Apps
 
Building a tvOS Application
Building a tvOS ApplicationBuilding a tvOS Application
Building a tvOS Application
 

Similar to Introduction to tvOS app Development !

Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Gil Irizarry
 
Apple TV - a quick start guide
Apple TV - a quick start guideApple TV - a quick start guide
Apple TV - a quick start guide
Ruptapas Chakraborty
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps Quickly
Gil Irizarry
 
Revue des annonces WWDC2015
Revue des annonces WWDC2015Revue des annonces WWDC2015
Revue des annonces WWDC2015
CocoaHeads France
 
Getting Started With Developing For Apple Watch
Getting Started With Developing For Apple WatchGetting Started With Developing For Apple Watch
Getting Started With Developing For Apple Watch
InMobi
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
Paul Jensen
 
Getting Started with Developing for the Apple Watch
Getting Started with Developing for the Apple WatchGetting Started with Developing for the Apple Watch
Getting Started with Developing for the Apple Watch
Murtza Manzur
 
2. workload
2.  workload2.  workload
2. workload
JudePragashVedam
 
IoT-javascript-2019-fosdem
IoT-javascript-2019-fosdemIoT-javascript-2019-fosdem
IoT-javascript-2019-fosdem
Phil www.rzr.online.fr
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
lzongren
 
Deploying Splunk on OpenShift – Part2 : Getting Data In
Deploying Splunk on OpenShift – Part2 : Getting Data InDeploying Splunk on OpenShift – Part2 : Getting Data In
Deploying Splunk on OpenShift – Part2 : Getting Data In
Eric Gardner
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
Techday7
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
Naga Harish M
 
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium EcosystemAppcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
Boydlee Pollentine
 
MongoDB World 2018: Building Serverless Apps with MongoDB Atlas on Google Clo...
MongoDB World 2018: Building Serverless Apps with MongoDB Atlas on Google Clo...MongoDB World 2018: Building Serverless Apps with MongoDB Atlas on Google Clo...
MongoDB World 2018: Building Serverless Apps with MongoDB Atlas on Google Clo...
MongoDB
 
Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile Applications
Sasha dos Santos
 
Pebble wearables devcon
Pebble wearables devconPebble wearables devcon
Pebble wearables devcon
Pebble Technology
 
What is Android?
What is Android?What is Android?
What is Android?
ndalban
 
Android by Swecha
Android by SwechaAndroid by Swecha
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
Dhaval Kaneria
 

Similar to Introduction to tvOS app Development ! (20)

Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
 
Apple TV - a quick start guide
Apple TV - a quick start guideApple TV - a quick start guide
Apple TV - a quick start guide
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps Quickly
 
Revue des annonces WWDC2015
Revue des annonces WWDC2015Revue des annonces WWDC2015
Revue des annonces WWDC2015
 
Getting Started With Developing For Apple Watch
Getting Started With Developing For Apple WatchGetting Started With Developing For Apple Watch
Getting Started With Developing For Apple Watch
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
Getting Started with Developing for the Apple Watch
Getting Started with Developing for the Apple WatchGetting Started with Developing for the Apple Watch
Getting Started with Developing for the Apple Watch
 
2. workload
2.  workload2.  workload
2. workload
 
IoT-javascript-2019-fosdem
IoT-javascript-2019-fosdemIoT-javascript-2019-fosdem
IoT-javascript-2019-fosdem
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Deploying Splunk on OpenShift – Part2 : Getting Data In
Deploying Splunk on OpenShift – Part2 : Getting Data InDeploying Splunk on OpenShift – Part2 : Getting Data In
Deploying Splunk on OpenShift – Part2 : Getting Data In
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
 
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium EcosystemAppcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
 
MongoDB World 2018: Building Serverless Apps with MongoDB Atlas on Google Clo...
MongoDB World 2018: Building Serverless Apps with MongoDB Atlas on Google Clo...MongoDB World 2018: Building Serverless Apps with MongoDB Atlas on Google Clo...
MongoDB World 2018: Building Serverless Apps with MongoDB Atlas on Google Clo...
 
Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile Applications
 
Pebble wearables devcon
Pebble wearables devconPebble wearables devcon
Pebble wearables devcon
 
What is Android?
What is Android?What is Android?
What is Android?
 
Android by Swecha
Android by SwechaAndroid by Swecha
Android by Swecha
 
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
 

Recently uploaded

paper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdfpaper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdf
ShurooqTaib
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
PriyankaKilaniya
 
一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理
一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理
一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理
nonods
 
FULL STACK PROGRAMMING - Both Front End and Back End
FULL STACK PROGRAMMING - Both Front End and Back EndFULL STACK PROGRAMMING - Both Front End and Back End
FULL STACK PROGRAMMING - Both Front End and Back End
PreethaV16
 
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
ijseajournal
 
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls ChennaiCall Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
paraasingh12 #V08
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
aryanpankaj78
 
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUESAN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
drshikhapandey2022
 
Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
PreethaV16
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
nedcocy
 
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Transcat
 
Impartiality as per ISO /IEC 17025:2017 Standard
Impartiality as per ISO /IEC 17025:2017 StandardImpartiality as per ISO /IEC 17025:2017 Standard
Impartiality as per ISO /IEC 17025:2017 Standard
MuhammadJazib15
 
Butterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdfButterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdf
Lubi Valves
 
Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...
Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...
Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...
IJCNCJournal
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
VANDANAMOHANGOUDA
 
Open Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surfaceOpen Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surface
Indrajeet sahu
 
SMT process how to making and defects finding
SMT process how to making and defects findingSMT process how to making and defects finding
SMT process how to making and defects finding
rameshqapcba
 
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
DharmaBanothu
 
Advancements in Automobile Engineering for Sustainable Development.pdf
Advancements in Automobile Engineering for Sustainable Development.pdfAdvancements in Automobile Engineering for Sustainable Development.pdf
Advancements in Automobile Engineering for Sustainable Development.pdf
JaveedKhan59
 
Supermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdfSupermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdf
Kamal Acharya
 

Recently uploaded (20)

paper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdfpaper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdf
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
 
一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理
一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理
一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理
 
FULL STACK PROGRAMMING - Both Front End and Back End
FULL STACK PROGRAMMING - Both Front End and Back EndFULL STACK PROGRAMMING - Both Front End and Back End
FULL STACK PROGRAMMING - Both Front End and Back End
 
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
 
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls ChennaiCall Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
 
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUESAN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
 
Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
 
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
 
Impartiality as per ISO /IEC 17025:2017 Standard
Impartiality as per ISO /IEC 17025:2017 StandardImpartiality as per ISO /IEC 17025:2017 Standard
Impartiality as per ISO /IEC 17025:2017 Standard
 
Butterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdfButterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdf
 
Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...
Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...
Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
 
Open Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surfaceOpen Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surface
 
SMT process how to making and defects finding
SMT process how to making and defects findingSMT process how to making and defects finding
SMT process how to making and defects finding
 
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
 
Advancements in Automobile Engineering for Sustainable Development.pdf
Advancements in Automobile Engineering for Sustainable Development.pdfAdvancements in Automobile Engineering for Sustainable Development.pdf
Advancements in Automobile Engineering for Sustainable Development.pdf
 
Supermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdfSupermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdf
 

Introduction to tvOS app Development !

  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. Anatomy of Apple TV Home Screen
  • 12.
  • 13. Choose your programming style ● TVML Apps: ○ The first uses an entirely new process utilizing TVML, TVJS and TVMLKit. TVML is a form of XML and stands for “Television Markup Language”. ○ TVJS is set of JavaScript APIs which provide you with the means to display apps created with TVML. ○ TVMLKit is the glue between TVML, JavaScript, and your native tvOS application. ● Custom Apps: ○ The second uses familiar iOS frameworks and concepts you know and love like Storyboards, UIKit, and Auto Layout. ○ Leverage many of the same frameworks, technologies, and concepts that you are already familiar developing with for iOS.
  • 14. TVOS UICollectionView and Detail view demo
  • 15. tvOS Simulator and Remote ● Touch Surface ● Buttons ● Microphone ● Gyroscope
  • 16. Focus ● Preferred Focus Environments ○ canBecomeFocused() ○ Focus Engine APIs ■ isEnabled automatically changes the Focus property ■ restoresFocusAfterTransition ■ Focus API gives us full control over how the views can interact with each other and with the UX https://developer.apple.com/videos/play/wwdc2016/215/?time=2103
  • 17.
  • 18. Parallax ● Creating Parallax image (https://developer.apple.com/library/tvos/documentation/General/Conceptual/AppleTV_PG/CreatingParallaxArtwork.html#//apple_r ef/doc/uid/TP40015241-CH19-SW1) ● Parallax Previewer
  • 20. Top Shelf - more than “second app icon” ● Content showcase area above the top row of apps on the Apple TV Home screen ● The user can decide which apps are in the top row. When one of these apps is brought into focus, the top shelf displays featured content specific to that app. ● Unique opportunity for your app to highlight new, featured, or useful content and let the user jump directly to it.
  • 23.
  • 24. Dynamic Content ● Interactive top shelf ● Choice of Inset Banner or Content Row ● Provides shortcuts to the content ● Can be personalized
  • 25. Inset top shelf ● great choice to display the overarching themes of your app ● Both layouts let the user scroll and browse through the your content ● For ex: Game app
  • 26. Sectioned top shelf ● Great choice to show grouped Information ● Feed information as quickly as possible ● For ex: New articles
  • 27.
  • 28. Let's Learn how to add top shelf ! - ● Download code from https://github.com/patilsnehal/tvOSTopShelf ● Run the project - News app ● Add a target to this project
  • 30. Principle Class - ServiceProvider ● ServiceProvider.swift should be created automatically for you ● TVTopShelfProvider protocol ● TVTopShelfContentStyle - Sectioned / Inset ● TVContentItem array - actual metadata ○ Content identifier ○ Title ○ Imageurl ○ imageShape ○ Display url ○ Play url ○ topshelfItem
  • 32. topShelfItem var topShelfItems: [TVContentItem] { // 1 let breakingNewsIdentifier = TVContentIdentifier(identifier: "Breaking News", container: nil)! let breakingNewsSection = TVContentItem(contentIdentifier: breakingNewsIdentifier)! breakingNewsSection.title = "Breaking News" // 2 let martianRiotIdentifier = TVContentIdentifier(identifier: "Martians Riot", container: nil)! let martianRiotItem = TVContentItem(contentIdentifier: martianRiotIdentifier)! // 3 breakingNewsSection.topShelfItems = [martianRiotItem] return [breakingNewsSection] }
  • 35. Add image for topshelf
  • 37. Adding more news items // 1 let milkyWayNewsIdentifier = TVContentIdentifier(identifier: "Milky Way News", container: nil)! let milkyWaySection = TVContentItem(contentIdentifier: milkyWayNewsIdentifier)! milkyWaySection.title = "Milky Way" // 2 let cometIdentifier = TVContentIdentifier(identifier: "An odd comet", container: nil)! let cometItem = TVContentItem(contentIdentifier: cometIdentifier)! cometItem.imageURL = NSBundle.mainBundle().URLForResource( "comet", withExtension: "png") // 3 let asteroidIdentifier = TVContentIdentifier(identifier: "Asteroid Light Speed", container: nil)! let asteroidItem = TVContentItem(contentIdentifier: asteroidIdentifier)! asteroidItem.imageURL = NSBundle.mainBundle().URLForResource( "asteroid", withExtension: "png") // 4 milkyWaySection.topShelfItems = [cometItem, asteroidItem] return [breakingNewsSection, milkyWaySection]
  • 38. Mulitple Section in top shelf
  • 39. Adding User Interaction ● Unfortunately you can not call IBAction event handling ● AppDelegate.swift will call application:openURL:options when a user selects anything in the top shelf ● Provide displayURL for detail view ● Provide playURL to direct playback or launch into action ● The top shelf can listen to two events on the remote: a press on the touch screen, and a press on the play button. ● Add custom url scheme to your app’s Info.plist file
  • 42. Hooking up the AppDelegate Adding the URLs martianRiotItem.displayURL = urlForIdentifier("martianRiot") cometItem.displayURL = urlForIdentifier("comet") asteroidItem.displayURL = urlForIdentifier("asteroid") Helper Method private func urlForIdentifier(identifier: String) -> NSURL { let components = NSURLComponents() components.scheme = "newsapp" components.queryItems = [NSURLQueryItem(name: "identifier", value: identifier)] return components.URL! }
  • 43. Appdelegate.swift let newsTab = 0 let martianTab = 1 let earthTab = 2 let milkyWayTab = 3 func application(app: UIApplication, openURL url: NSURL, options: [String: AnyObject]) -> Bool { guard let initialViewController = window?.rootViewController as? UITabBarController else { return false } switch url.absoluteString { case "newsapp:?identifier=martianRiot": initialViewController.selectedIndex = martianTab case "newsapp:?identifier=comet", "newsapp:?identifier=asteroid": initialViewController.selectedIndex = milkyWayTab default: return false } return true }
  • 44. Tips and Tricks ● Provide both displayURL and playURL ● Post TVTopShelfItemsDidChangeNotification ● Use NSUserDefaults and set up App Group to share data between app and extension
  • 45. Managing Resources - iCloud and ODR ● Storage on Apple TV is limited < 200MB ● No guarantee that information stored on the device will be available the next time a user opens your app ● Need to store user information somewhere else than Apple TV so that it can be accessed by our application on other devices ● iCloud Key-Value Storage (KVS) and CloudKit. ● 1M < use iCloud KVS. iCloud KVS automatically synchronizes information across all of a user’s devices. Only the owner of the app is able to access the information stored by iCloud KVS. ● 1MB > use CloudKit. CloudKit allows information stored by one user to be accessed by another user.
  • 46. On Demand Resources ● tvOS apps have a maximum initial download size of 200 MB, and any additional resources must be available through ODR. ● Only retrieves the resources it’s needed up to that point. (For ex. Download resources for level 1 game) ● Why to use ODR? ○ Faster initial download ○ Smaller app size Level 1 Bundle tag1 Level 2 Bundle tag2 App
  • 47. References ● https://www.raywenderlich.com ● https://www.youtube.com/watch?v=k4pSxlEnFqM&index=1&list=PLiRG83hKoub9vYDmeyXh50U9Z YbNJ6PZF ● https://developer.apple.com/library/tvos/documentation/General/Conceptual/AppleTV_PG/YourFirst AppleTVApp.html ● https://developer.apple.com/videos/techtalks-apple-tv/
  • 48. Q & A