SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Downloaden Sie, um offline zu lesen
Introducing Features
of WatchOS 2
Joe
2015/7/17
Outline
• Architecture of WatchOS 2
• A bunch of new interface elements.
• Complications. (ClockKit)
• Taptic Engine.
• Accessibility
• Open System URL
• Hints of building Watch app
Architecture of
WatchOS 2
Architecture of WatchOS 2
(In order to remove the dependency from
iPhone)
Extensions built specifically for watchOS 2 have
access to the following system frameworks
WatchOS 2 provides ways for communicating with
iOS app or network
• Communicate with network:NSURLSession
• Communicate with iOS app:Watch Connectivity
Watch App communicates with iOS App
and vice versa
(Watch Connectivity)
• Precondition:WCSession.isSupported()
• Communication categories
• Background transfers
• Interactive messaging
Background transfers
• Best when information isn’t needed immediately
• Operating system determines the most suitable
time to send the data
• Content is queued up for transfer
Three ways of communicating
for background transfers
• Application Context:Information waiting in a
transfer queue will get overridden by the latest
data.
• User Info Transfer:Information waiting in a
transfer queue will deliver one by one in FIFO
order.(Like openParentApplication)
• File Transfer:Transfer files
Interactive messaging
• Precondition:iOS and watch App must be in
reachable state.(They must be connected via
Bluetooth) and watch app must be running in
the foreground.
Demo
API for background transfers
• Application Context:
• Sender:updateApplicationContext(_:)
• Receiver:session(_:didReceiveApplicationContext:)
• User Info Transfer:
• Sender:transferUserInfo(_:)
• Receiver:session(_:didReceiveUserInfo:)

• File Transfer:
• Sender:transferFile(_:metadata:)
• Receiver:session(_:didReceiveFile:)
Sender has an instance of WCSession

Receiver is instance which implements 

WCSessionDelegate
API for interactive
messaging
• Sender
• sendMessage(_:replyHandler: errorHandler:)
• sendMessageData(_:replyHandler: errorHandler:)
• Receiver
• session(_:didReceiveMessage:replyHandler:)
• session(_:didReceiveMessageData:replyHandler:)
A bunch of new
interface elements
A bunch of new interface
elements
• WKInterfacePicker (Digital crown)
• Alerts and Action Sheets
• WKInterfaceMovie
• WKInterfaceController
• Playing Short Audio and Video Clips(Behavior like WKInterfaceMovie)
• Recording Short Audio Clips
• Animation
• WKAudioFilePlayer
• Playing Extended Audio Content (It needed to connect a blue tooth headset
now)
Demo
WKInterfacePicker
• A WKInterfacePicker object displays a
sequence of items that the user can navigate
through using the Digital Crown.
• Three types:list、stack、sequence
• Advance:Coordinated images
Alerts and Action Sheets
• Alerts and action sheets offer a standard interface for
displaying messages to the user.When tapped, the buttons
call blocks of code that you provide.
• WKInterfaceController:
presentAlertControllerWithTitle:message:preferredStyle:acti
ons:
• WKAlertControllerStyle:Alert, ActionSheet,
SideBySideButtonAlert
• WKAlertAction:Default, Cancel, Destructive

WKInterfaceMovie
• A WKInterfaceMovie object lets you embed short
audio or video clips directly into your interface.
• setMovieURL(URL: NSURL)
• setVideoGravity(videoGravity: WKVideoGravity)
• setLoops(loops: Bool)
• setPosterImage(posterImage: WKImage?)
Playing Short Audio and
Video Clips
• presentMediaPlayerControllerWithURL(URL:
NSURL, options: [NSObject : AnyObject]?,
completion: (Bool, NSTimeInterval, NSError?) ->
Void)
• dismissMediaPlayerController
Recording Short Audio Clips
• presentAudioRecordingControllerWithOutputUR
L(URL: NSURL, preset:
WKAudioRecordingPreset, maximumDuration:
NSTimeInterval, actionTitle: String?, completion:
(Bool, NSError?) -> Void)
• dismissAudioRecordingController
Animation
• WKInterfaceController
• animateWithDuration:
Playing Extended Audio Content
(WKAudioFilePlayer)
• Precondition: It needed to connect a Bluetooth
Headset with watch.
• WKAudioFilePlayer play WKAudioFilePlayerItem
which contains WKAudioFileAsset(URL, title,
albumTitle, artist, duration)
Complications.
(ClockKit)
Four ways to show
information from your app
• Watch app
• Glance
• Notification
• Complication
Complication
Timeline
( The data that changes by time)
CLKComplicationDataSource
• getSupportedTimeTravelDirectionsForComplication
• getTimelineStartDateForComplication
• getTimelineEndDateForComplication
• getPrivacyBehaviorForComplication
• getCurrentTimelineEntryForComplication
• getTimelineEntriesForComplication
• getNextRequestedUpdateDateWithHandler
• getPlaceholderTemplateForComplication
CLKComplicationTimelineEntry
Different timing (date) corresponding to layout (template)
A bunch of templates
Template
(Layout of complication)
e.g. CLKComplicationTemplateModularLargeStandardBody
headerText
body2Text
body1Text
Text is not type of string.
CLKTextProvider
(It is an abstract class)
• e.g. shows “Thursday, October 22” on
complication by CLKDateTextProvider (truncate
automatically)
• Thur, October 22
• Thur, Oct 22
• Oct 22
• 22
Demo
Taptic Engine
Provide physical feedback
via the Taptic Engine
• WKInterfaceDevice.currentDevice().playHaptic(h
apticType)
• hapticType:Notification, DirectionUp,
DirectionDown, Success, Failure, Retry, Start,
Stop, Click
Accessibility
Apple Watch Accessibility
• setAccessibilityLabel(accessibilityLabel: String?)
• setAccessibilityHint(accessibilityHint: String?)
• setAccessibilityValue(accessibilityValue: String?)
• setIsAccessibilityElement(isAccessibilityElement: Bool)
• setAccessibilityTraits(accessibilityTraits:
UIAccessibilityTraits)
• setAccessibilityImageRegions(accessibilityImageRegions
: [WKAccessibilityImageRegion])
Open System URL
Open System URL
• url:
• tel:
• sms:
• mailto:
• facetime:
• http://maps.apple.com/?daddr=San+Francisco,+CA&saddr=cupertino
• http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?
i=156093464&id=156093462&s=143441
• http://www.youtube.com/v/VIDEO_IDENTIFIER
WKExtension.sharedExtension()
.openSystemURL(url)
Hints of building
Watch app
Hints of building Watch app
• UI is stored in Watch app
• One controller per screen of content
• Layout of WatchKit is flow-based layout
• Code updates UI from the extension
• Manages UI elements through outlets
• Uses target-action design pattern
• Profile with Instruments
Reference
• https://developer.apple.com/watch/human-
interface-guidelines/
• http://www.kristinathai.com/watchos-2-how-to-
communicate-between-devices-using-watch-
connectivity/
• watchOS 2 Transition Guide
• https://github.com/joehsieh/watchOS-2-Sampler
Q & A

Weitere ähnliche Inhalte

Was ist angesagt?

How we use Fluentd in Treasure Data
How we use Fluentd in Treasure DataHow we use Fluentd in Treasure Data
How we use Fluentd in Treasure DataSadayuki Furuhashi
 
2019 Lightning Talk: Discovery, Consul and Inversion of Control for the infr...
2019  Lightning Talk: Discovery, Consul and Inversion of Control for the infr...2019  Lightning Talk: Discovery, Consul and Inversion of Control for the infr...
2019 Lightning Talk: Discovery, Consul and Inversion of Control for the infr...Pierre Souchay
 
Strata London 2018: Multi-everything with Apache Pulsar
Strata London 2018:  Multi-everything with Apache PulsarStrata London 2018:  Multi-everything with Apache Pulsar
Strata London 2018: Multi-everything with Apache PulsarStreamlio
 
Microservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring CloudMicroservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring Cloudacogoluegnes
 
Amazon Aws Presentation Drupal
Amazon Aws Presentation DrupalAmazon Aws Presentation Drupal
Amazon Aws Presentation Drupalguest856f3a
 
Building and running Spring Cloud-based microservices on AWS ECS
Building and running Spring Cloud-based microservices on AWS ECSBuilding and running Spring Cloud-based microservices on AWS ECS
Building and running Spring Cloud-based microservices on AWS ECSJoris Kuipers
 
Monitoring Docker containers - Docker NYC Feb 2015
Monitoring Docker containers - Docker NYC Feb 2015Monitoring Docker containers - Docker NYC Feb 2015
Monitoring Docker containers - Docker NYC Feb 2015Datadog
 
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
 Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnesdistributed matters
 
Ford's AWS Service Update - March 2020 (Richmond AWS User Group)
Ford's AWS Service Update - March 2020 (Richmond AWS User Group)Ford's AWS Service Update - March 2020 (Richmond AWS User Group)
Ford's AWS Service Update - March 2020 (Richmond AWS User Group)Ford Prior
 
April 2013 HUG: Storm and Hadoop - Convergence of Big-Data and Low-Latency Pr...
April 2013 HUG: Storm and Hadoop - Convergence of Big-Data and Low-Latency Pr...April 2013 HUG: Storm and Hadoop - Convergence of Big-Data and Low-Latency Pr...
April 2013 HUG: Storm and Hadoop - Convergence of Big-Data and Low-Latency Pr...Yahoo Developer Network
 
K8s in 2hours
K8s in 2hoursK8s in 2hours
K8s in 2hoursDEV Cafe
 
Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana.
Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana.Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana.
Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana.Airat Khisamov
 
Pax Migration Ocs 23062008
Pax Migration Ocs 23062008Pax Migration Ocs 23062008
Pax Migration Ocs 23062008Cassio
 
A Brief Introduce to WSGI
A Brief Introduce to WSGIA Brief Introduce to WSGI
A Brief Introduce to WSGIMingli Yuan
 
Enforcing Application SLA with Congress and Monasca
Enforcing Application SLA with Congress and MonascaEnforcing Application SLA with Congress and Monasca
Enforcing Application SLA with Congress and MonascaFabio Giannetti
 

Was ist angesagt? (19)

How we use Fluentd in Treasure Data
How we use Fluentd in Treasure DataHow we use Fluentd in Treasure Data
How we use Fluentd in Treasure Data
 
2019 Lightning Talk: Discovery, Consul and Inversion of Control for the infr...
2019  Lightning Talk: Discovery, Consul and Inversion of Control for the infr...2019  Lightning Talk: Discovery, Consul and Inversion of Control for the infr...
2019 Lightning Talk: Discovery, Consul and Inversion of Control for the infr...
 
Strata London 2018: Multi-everything with Apache Pulsar
Strata London 2018:  Multi-everything with Apache PulsarStrata London 2018:  Multi-everything with Apache Pulsar
Strata London 2018: Multi-everything with Apache Pulsar
 
Docker in OpenStack
Docker in OpenStackDocker in OpenStack
Docker in OpenStack
 
Microservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring CloudMicroservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring Cloud
 
Keystone Federation
Keystone Federation Keystone Federation
Keystone Federation
 
Amazon Aws Presentation Drupal
Amazon Aws Presentation DrupalAmazon Aws Presentation Drupal
Amazon Aws Presentation Drupal
 
Building and running Spring Cloud-based microservices on AWS ECS
Building and running Spring Cloud-based microservices on AWS ECSBuilding and running Spring Cloud-based microservices on AWS ECS
Building and running Spring Cloud-based microservices on AWS ECS
 
Monitoring Docker containers - Docker NYC Feb 2015
Monitoring Docker containers - Docker NYC Feb 2015Monitoring Docker containers - Docker NYC Feb 2015
Monitoring Docker containers - Docker NYC Feb 2015
 
Programming Amazon Web Services
Programming Amazon Web ServicesProgramming Amazon Web Services
Programming Amazon Web Services
 
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
 Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
 
Ford's AWS Service Update - March 2020 (Richmond AWS User Group)
Ford's AWS Service Update - March 2020 (Richmond AWS User Group)Ford's AWS Service Update - March 2020 (Richmond AWS User Group)
Ford's AWS Service Update - March 2020 (Richmond AWS User Group)
 
April 2013 HUG: Storm and Hadoop - Convergence of Big-Data and Low-Latency Pr...
April 2013 HUG: Storm and Hadoop - Convergence of Big-Data and Low-Latency Pr...April 2013 HUG: Storm and Hadoop - Convergence of Big-Data and Low-Latency Pr...
April 2013 HUG: Storm and Hadoop - Convergence of Big-Data and Low-Latency Pr...
 
K8s in 2hours
K8s in 2hoursK8s in 2hours
K8s in 2hours
 
Project: OpenStack, #OSATH
Project: OpenStack, #OSATH Project: OpenStack, #OSATH
Project: OpenStack, #OSATH
 
Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana.
Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana.Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana.
Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana.
 
Pax Migration Ocs 23062008
Pax Migration Ocs 23062008Pax Migration Ocs 23062008
Pax Migration Ocs 23062008
 
A Brief Introduce to WSGI
A Brief Introduce to WSGIA Brief Introduce to WSGI
A Brief Introduce to WSGI
 
Enforcing Application SLA with Congress and Monasca
Enforcing Application SLA with Congress and MonascaEnforcing Application SLA with Congress and Monasca
Enforcing Application SLA with Congress and Monasca
 

Ähnlich wie WatchOS2

Oliot epcis at a glance
Oliot epcis at a glanceOliot epcis at a glance
Oliot epcis at a glanceJaewook Byun
 
LowlaDB intro March 2015
LowlaDB intro March 2015LowlaDB intro March 2015
LowlaDB intro March 2015Teamstudio
 
Meetup on Apache Zookeeper
Meetup on Apache ZookeeperMeetup on Apache Zookeeper
Meetup on Apache ZookeeperAnshul Patel
 
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceCOMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceAntonio García-Domínguez
 
AWS re:Invent 2016: Netflix: Container Scheduling, Execution, and Integration...
AWS re:Invent 2016: Netflix: Container Scheduling, Execution, and Integration...AWS re:Invent 2016: Netflix: Container Scheduling, Execution, and Integration...
AWS re:Invent 2016: Netflix: Container Scheduling, Execution, and Integration...Amazon Web Services
 
Re:invent 2016 Container Scheduling, Execution and AWS Integration
Re:invent 2016 Container Scheduling, Execution and AWS IntegrationRe:invent 2016 Container Scheduling, Execution and AWS Integration
Re:invent 2016 Container Scheduling, Execution and AWS Integrationaspyker
 
Building the Internet of Things with Thingsquare and Contiki - day 1, part 3
Building the Internet of Things with Thingsquare and Contiki - day 1, part 3Building the Internet of Things with Thingsquare and Contiki - day 1, part 3
Building the Internet of Things with Thingsquare and Contiki - day 1, part 3Adam Dunkels
 
Quick overview of Openstack architecture
Quick overview of Openstack architectureQuick overview of Openstack architecture
Quick overview of Openstack architectureToni Ramirez
 
Behind the scenes of Real-Time Notifications
Behind the scenes of Real-Time NotificationsBehind the scenes of Real-Time Notifications
Behind the scenes of Real-Time NotificationsGuillermo Mansilla
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5Malam Team
 
Realtime Web Apps: WebSockets & WebRTC
 Realtime Web Apps: WebSockets & WebRTC  Realtime Web Apps: WebSockets & WebRTC
Realtime Web Apps: WebSockets & WebRTC VivochaLabs
 
Openstack meetup lyon_2017-09-28
Openstack meetup lyon_2017-09-28Openstack meetup lyon_2017-09-28
Openstack meetup lyon_2017-09-28Xavier Lucas
 
Intro to InfluxDB
Intro to InfluxDBIntro to InfluxDB
Intro to InfluxDBInfluxData
 
Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15streamdata.io
 

Ähnlich wie WatchOS2 (20)

Windows 8 Apps and the Outside World
Windows 8 Apps and the Outside WorldWindows 8 Apps and the Outside World
Windows 8 Apps and the Outside World
 
Windows 8 Metro apps and the outside world
Windows 8 Metro apps and the outside worldWindows 8 Metro apps and the outside world
Windows 8 Metro apps and the outside world
 
Oliot epcis at a glance
Oliot epcis at a glanceOliot epcis at a glance
Oliot epcis at a glance
 
LowlaDB intro March 2015
LowlaDB intro March 2015LowlaDB intro March 2015
LowlaDB intro March 2015
 
Meetup on Apache Zookeeper
Meetup on Apache ZookeeperMeetup on Apache Zookeeper
Meetup on Apache Zookeeper
 
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceCOMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
 
Web-Socket
Web-SocketWeb-Socket
Web-Socket
 
AWS re:Invent 2016: Netflix: Container Scheduling, Execution, and Integration...
AWS re:Invent 2016: Netflix: Container Scheduling, Execution, and Integration...AWS re:Invent 2016: Netflix: Container Scheduling, Execution, and Integration...
AWS re:Invent 2016: Netflix: Container Scheduling, Execution, and Integration...
 
Re:invent 2016 Container Scheduling, Execution and AWS Integration
Re:invent 2016 Container Scheduling, Execution and AWS IntegrationRe:invent 2016 Container Scheduling, Execution and AWS Integration
Re:invent 2016 Container Scheduling, Execution and AWS Integration
 
Building the Internet of Things with Thingsquare and Contiki - day 1, part 3
Building the Internet of Things with Thingsquare and Contiki - day 1, part 3Building the Internet of Things with Thingsquare and Contiki - day 1, part 3
Building the Internet of Things with Thingsquare and Contiki - day 1, part 3
 
Quick overview of Openstack architecture
Quick overview of Openstack architectureQuick overview of Openstack architecture
Quick overview of Openstack architecture
 
Behind the scenes of Real-Time Notifications
Behind the scenes of Real-Time NotificationsBehind the scenes of Real-Time Notifications
Behind the scenes of Real-Time Notifications
 
Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
 
Realtime Web Apps: WebSockets & WebRTC
 Realtime Web Apps: WebSockets & WebRTC  Realtime Web Apps: WebSockets & WebRTC
Realtime Web Apps: WebSockets & WebRTC
 
Ceilosca
CeiloscaCeilosca
Ceilosca
 
Openstack meetup lyon_2017-09-28
Openstack meetup lyon_2017-09-28Openstack meetup lyon_2017-09-28
Openstack meetup lyon_2017-09-28
 
Intro to InfluxDB
Intro to InfluxDBIntro to InfluxDB
Intro to InfluxDB
 
Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15
 
Getting Started with AWS IoT
Getting Started with AWS IoTGetting Started with AWS IoT
Getting Started with AWS IoT
 

Kürzlich hochgeladen

How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptrcbcrtm
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 

Kürzlich hochgeladen (20)

How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.ppt
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 

WatchOS2

  • 2. Outline • Architecture of WatchOS 2 • A bunch of new interface elements. • Complications. (ClockKit) • Taptic Engine. • Accessibility • Open System URL • Hints of building Watch app
  • 4. Architecture of WatchOS 2 (In order to remove the dependency from iPhone)
  • 5. Extensions built specifically for watchOS 2 have access to the following system frameworks
  • 6. WatchOS 2 provides ways for communicating with iOS app or network • Communicate with network:NSURLSession • Communicate with iOS app:Watch Connectivity
  • 7. Watch App communicates with iOS App and vice versa (Watch Connectivity) • Precondition:WCSession.isSupported() • Communication categories • Background transfers • Interactive messaging
  • 8. Background transfers • Best when information isn’t needed immediately • Operating system determines the most suitable time to send the data • Content is queued up for transfer
  • 9. Three ways of communicating for background transfers • Application Context:Information waiting in a transfer queue will get overridden by the latest data. • User Info Transfer:Information waiting in a transfer queue will deliver one by one in FIFO order.(Like openParentApplication) • File Transfer:Transfer files
  • 10. Interactive messaging • Precondition:iOS and watch App must be in reachable state.(They must be connected via Bluetooth) and watch app must be running in the foreground.
  • 11. Demo
  • 12. API for background transfers • Application Context: • Sender:updateApplicationContext(_:) • Receiver:session(_:didReceiveApplicationContext:) • User Info Transfer: • Sender:transferUserInfo(_:) • Receiver:session(_:didReceiveUserInfo:)
 • File Transfer: • Sender:transferFile(_:metadata:) • Receiver:session(_:didReceiveFile:) Sender has an instance of WCSession
 Receiver is instance which implements 
 WCSessionDelegate
  • 13. API for interactive messaging • Sender • sendMessage(_:replyHandler: errorHandler:) • sendMessageData(_:replyHandler: errorHandler:) • Receiver • session(_:didReceiveMessage:replyHandler:) • session(_:didReceiveMessageData:replyHandler:)
  • 14. A bunch of new interface elements
  • 15. A bunch of new interface elements • WKInterfacePicker (Digital crown) • Alerts and Action Sheets • WKInterfaceMovie • WKInterfaceController • Playing Short Audio and Video Clips(Behavior like WKInterfaceMovie) • Recording Short Audio Clips • Animation • WKAudioFilePlayer • Playing Extended Audio Content (It needed to connect a blue tooth headset now)
  • 16. Demo
  • 17. WKInterfacePicker • A WKInterfacePicker object displays a sequence of items that the user can navigate through using the Digital Crown. • Three types:list、stack、sequence • Advance:Coordinated images
  • 18. Alerts and Action Sheets • Alerts and action sheets offer a standard interface for displaying messages to the user.When tapped, the buttons call blocks of code that you provide. • WKInterfaceController: presentAlertControllerWithTitle:message:preferredStyle:acti ons: • WKAlertControllerStyle:Alert, ActionSheet, SideBySideButtonAlert • WKAlertAction:Default, Cancel, Destructive

  • 19. WKInterfaceMovie • A WKInterfaceMovie object lets you embed short audio or video clips directly into your interface. • setMovieURL(URL: NSURL) • setVideoGravity(videoGravity: WKVideoGravity) • setLoops(loops: Bool) • setPosterImage(posterImage: WKImage?)
  • 20. Playing Short Audio and Video Clips • presentMediaPlayerControllerWithURL(URL: NSURL, options: [NSObject : AnyObject]?, completion: (Bool, NSTimeInterval, NSError?) -> Void) • dismissMediaPlayerController
  • 21. Recording Short Audio Clips • presentAudioRecordingControllerWithOutputUR L(URL: NSURL, preset: WKAudioRecordingPreset, maximumDuration: NSTimeInterval, actionTitle: String?, completion: (Bool, NSError?) -> Void) • dismissAudioRecordingController
  • 23. Playing Extended Audio Content (WKAudioFilePlayer) • Precondition: It needed to connect a Bluetooth Headset with watch. • WKAudioFilePlayer play WKAudioFilePlayerItem which contains WKAudioFileAsset(URL, title, albumTitle, artist, duration)
  • 25. Four ways to show information from your app • Watch app • Glance • Notification • Complication
  • 27. Timeline ( The data that changes by time)
  • 28. CLKComplicationDataSource • getSupportedTimeTravelDirectionsForComplication • getTimelineStartDateForComplication • getTimelineEndDateForComplication • getPrivacyBehaviorForComplication • getCurrentTimelineEntryForComplication • getTimelineEntriesForComplication • getNextRequestedUpdateDateWithHandler • getPlaceholderTemplateForComplication
  • 29. CLKComplicationTimelineEntry Different timing (date) corresponding to layout (template)
  • 30. A bunch of templates
  • 31. Template (Layout of complication) e.g. CLKComplicationTemplateModularLargeStandardBody headerText body2Text body1Text Text is not type of string.
  • 32. CLKTextProvider (It is an abstract class) • e.g. shows “Thursday, October 22” on complication by CLKDateTextProvider (truncate automatically) • Thur, October 22 • Thur, Oct 22 • Oct 22 • 22
  • 33. Demo
  • 35. Provide physical feedback via the Taptic Engine • WKInterfaceDevice.currentDevice().playHaptic(h apticType) • hapticType:Notification, DirectionUp, DirectionDown, Success, Failure, Retry, Start, Stop, Click
  • 37. Apple Watch Accessibility • setAccessibilityLabel(accessibilityLabel: String?) • setAccessibilityHint(accessibilityHint: String?) • setAccessibilityValue(accessibilityValue: String?) • setIsAccessibilityElement(isAccessibilityElement: Bool) • setAccessibilityTraits(accessibilityTraits: UIAccessibilityTraits) • setAccessibilityImageRegions(accessibilityImageRegions : [WKAccessibilityImageRegion])
  • 39. Open System URL • url: • tel: • sms: • mailto: • facetime: • http://maps.apple.com/?daddr=San+Francisco,+CA&saddr=cupertino • http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum? i=156093464&id=156093462&s=143441 • http://www.youtube.com/v/VIDEO_IDENTIFIER WKExtension.sharedExtension() .openSystemURL(url)
  • 41. Hints of building Watch app • UI is stored in Watch app • One controller per screen of content • Layout of WatchKit is flow-based layout • Code updates UI from the extension • Manages UI elements through outlets • Uses target-action design pattern • Profile with Instruments
  • 43. Q & A