SlideShare une entreprise Scribd logo
1  sur  30
WatchKit Pitfalls
Developing iOS App for Dribbble
Zgonik Vova
Register your application
• Website URL
• Callback URL
• Client ID
• Client Secret
• Client Access Token
https://dribbble.com/account/applications/new
OAuth2 solutions
NXOauth2Client GTMOAuth2
• Detailed error handling
• Block callbacks
• No response body on auth error
• NSNotificationCenter
Dribbble API understanding of HTTP response codes
422
Unprocessable Entity
400
Bad request
500
Internal server error
403
Operation is forbidden
• upload shot or attachment without
mimeType
• follow more than 1800 followers
• follow own userId
• incorrect parameter name
• upload limit:
- 48 shots per month
- 5 shots per day
• access denied (canUplodShot = NO)
429
Too many requests
304
Content not modified
404
Not found
204
No content
API restrictions:
• 60 requests per minute
• 10000 requests per day
• no like shot, like comment
transaction entry found
• no following transaction entry «A
follows B» found
• presence of transaction entry for
user «A follows user B»
• response on delete request for:
like comment, like shot
• if the resource has not changed in
conditional request with parameter
If-Modified-Since
• POST incorrect JSON
Requests Rate Limiting
low-priority
• check if like shot
• check if follow user
• 60 per minute
• 10000 per day
high-priority
• account request
• switch & load category of shots
• like shot
• follow user
Apple Watch
watchOS App
WatchKit App
WatchKit app Target
Storyboard
Resources
WatchKit Extension
WatchKit extension target
WatchKit code
and Resources
WatchKit App
IOS App
iOS app target
iOS Code
WatchKit
Extension
WatchKit app stores on
watch device and consist
of storyboard and static
resources (images, fonts)
WatchKit Extension stores
on iPhone and consist of
source and resources
all source executes on
iPhone, without iPhone
Watch app won’t launch
NOT SURE OF WHAT IS GOING ON HERE
iPhone
Extension Communication
Glance
Notification
WKInterfaceController
Apple Watch
WatchKit App
Storyboard
Resources
WatchKit
Extension
Code
Resources
WatchKitWatchKit
WatchKit Launch Flow
Launch WatchKit
APP
Load initial
interface controller
Initialize
UI
Display
UI
Storyboard
Interface controller
init willActivate
• user launches app on watch
• watchKit finds initial controller in storyboard and notifies iPhone
• watchKit Extension should be launched and specified class of controller is instantinated
WatchKit
Extension
Glance
• no interactive items: buttons, switches
• no vertical scrolling
• San Francisco system font only
• Apple doesn’t recommend use maps and tables
Notification short look
• no interactive items: buttons, switches, sliders
• allow different typefaces of system font
• allow change tint color with app Name
Notification long look
system stuff
application
content
action defined
in watch app
two types activation mode:
background & foreground
• openParentApplication:reply:
• App Groups
• Darwin-notification
• Handoff
WatchKit Extension and App Communication
Communication
• model classes, web services, credentials
• restricted API:
! any API marked with
NS_EXTENSION_UNAVAILABLE
! calls to UIApplication +sharedApplication
! access the camera or microphone on an
iOS device
! receive data using AirDrop
Sharing code
openParentApplication
API on watch App [WKInterfaceController openParentApplication:reply:]
API on main application: implement (:handleWatchKitExtensionRequest:reply:)
• main app launches in background
• error handling available
- slower than other methods + API calls time increases
- objects should conform <NSCoding>
App Groups
• com.apple.security.application-groups entitlement
• initWithSuiteName: (NSUserDefaults)
• containerURLForSecurityApplicationGroupIdentifier: (NSFileManager)
- main app can’t notify watch about new data
Darwin-notifications
Exchange messages between processes in iOS by means of Darwin-notifications
pod ‘MMWormHole’
Sending process
Notification
notifyd
routines allow processes
to exchange stateless
notification events
process 1
process 2
process 3
Client processesnotification is just a signal
it can't transport any data apart from
the notification identifier
Handoff
• NSUserActivity in main app’s Info.plist
• perform updateUserActivity:userInfo:webpageURL: in WKInterfaceController
• handle activity event in AppDelegate:
- application:willContinueUserActivity
- application:continueUserActivity:restorationHandler
Shot Bucket App
ApiClient
AppDelegate
ShotsViewController
WKInterfaceControllerWatch App
Main App
Core structure
ShotsController
Data source
Networking
ShotBucketCore
Framework
App Models
Oauth2Clients
Api Clients
ActionManager
Gallery on WatchKit
. . . . . . . . .
Gallery on WatchKit
reloadRootControllersWithNames:
contexts:
swipe
Initial
Interface
Controller
swipe
12:0012-0012-00
12-00
Load more
Modal
controller
12-00Close
ContentContent
More pictures?
Page-based Controller Life Cycle Changes
Smart personalized notifications without backend
Background fetch
Conditional request
Last-Modified: Sat, 22 Feb 2014 17:10:33 GMT
HTTP/1.1 304 Not ModifiedHTTP/1.1 200 OK
Local notification No action
BG Fetch issues
- [UIApplication performFetchWithCompletionHandler:]
UIBackgroundFetchResult
• UIBackgroundFetchResultNewData
• UIBackgroundFetchResultNoData
• UIBackgroundFetchResultFailed
https://github.com/agilie/dribbble-ios-sdk

Contenu connexe

Tendances

Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...BlueMetalInc
 
Build a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.jsBuild a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.jsStormpath
 
Spring Boot Authentication...and More!
Spring Boot Authentication...and More! Spring Boot Authentication...and More!
Spring Boot Authentication...and More! Stormpath
 
Building SharePoint 2013 Apps - Architecture, Authentication & Connectivity API
Building SharePoint 2013 Apps - Architecture, Authentication & Connectivity APIBuilding SharePoint 2013 Apps - Architecture, Authentication & Connectivity API
Building SharePoint 2013 Apps - Architecture, Authentication & Connectivity APISharePointRadi
 
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted AppsSharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted AppsSanjay Patel
 
Developer’s Independence Day: Introducing the SharePoint App Model
Developer’s Independence Day:Introducing the SharePoint App ModelDeveloper’s Independence Day:Introducing the SharePoint App Model
Developer’s Independence Day: Introducing the SharePoint App Modelbgerman
 
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013Aaron Parecki
 
O365Con18 - Introduction to Azure Web Applications - Eric Shupps
O365Con18 - Introduction to Azure Web Applications  - Eric ShuppsO365Con18 - Introduction to Azure Web Applications  - Eric Shupps
O365Con18 - Introduction to Azure Web Applications - Eric ShuppsNCCOMMS
 
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...SPTechCon
 
SPUnite17 Who Are You and What Do You Want
SPUnite17 Who Are You and What Do You WantSPUnite17 Who Are You and What Do You Want
SPUnite17 Who Are You and What Do You WantNCCOMMS
 
App Model For SharePoint 2013
App Model For SharePoint 2013App Model For SharePoint 2013
App Model For SharePoint 2013Toni Il Caiser
 
HTTP Services & REST API Security
HTTP Services & REST API SecurityHTTP Services & REST API Security
HTTP Services & REST API SecurityTaiseer Joudeh
 
Dreamforce 2017 - Up close and personal with Lightning Experience as Platform
Dreamforce 2017 - Up close and personal with Lightning Experience as PlatformDreamforce 2017 - Up close and personal with Lightning Experience as Platform
Dreamforce 2017 - Up close and personal with Lightning Experience as Platformandyinthecloud
 
SharePoint, ADFS and Claims Auth
SharePoint, ADFS and Claims AuthSharePoint, ADFS and Claims Auth
SharePoint, ADFS and Claims AuthKashif Imran
 
Introducing the new SharePoint 2013 app model
Introducing the new SharePoint 2013 app modelIntroducing the new SharePoint 2013 app model
Introducing the new SharePoint 2013 app modelJeremy Thake
 
Building strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsBuilding strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsandyinthecloud
 

Tendances (20)

Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
 
Build a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.jsBuild a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.js
 
Spring Boot Authentication...and More!
Spring Boot Authentication...and More! Spring Boot Authentication...and More!
Spring Boot Authentication...and More!
 
Building SharePoint 2013 Apps - Architecture, Authentication & Connectivity API
Building SharePoint 2013 Apps - Architecture, Authentication & Connectivity APIBuilding SharePoint 2013 Apps - Architecture, Authentication & Connectivity API
Building SharePoint 2013 Apps - Architecture, Authentication & Connectivity API
 
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted AppsSharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
 
Mobile App Development 101
Mobile App Development 101Mobile App Development 101
Mobile App Development 101
 
Developer’s Independence Day: Introducing the SharePoint App Model
Developer’s Independence Day:Introducing the SharePoint App ModelDeveloper’s Independence Day:Introducing the SharePoint App Model
Developer’s Independence Day: Introducing the SharePoint App Model
 
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
 
O365Con18 - Introduction to Azure Web Applications - Eric Shupps
O365Con18 - Introduction to Azure Web Applications  - Eric ShuppsO365Con18 - Introduction to Azure Web Applications  - Eric Shupps
O365Con18 - Introduction to Azure Web Applications - Eric Shupps
 
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
 
SPUnite17 Who Are You and What Do You Want
SPUnite17 Who Are You and What Do You WantSPUnite17 Who Are You and What Do You Want
SPUnite17 Who Are You and What Do You Want
 
App Model For SharePoint 2013
App Model For SharePoint 2013App Model For SharePoint 2013
App Model For SharePoint 2013
 
HTTP Services & REST API Security
HTTP Services & REST API SecurityHTTP Services & REST API Security
HTTP Services & REST API Security
 
SharePoint Server 2013: to app or not to app?
SharePoint Server 2013: to app or not to app? SharePoint Server 2013: to app or not to app?
SharePoint Server 2013: to app or not to app?
 
Dreamforce 2017 - Up close and personal with Lightning Experience as Platform
Dreamforce 2017 - Up close and personal with Lightning Experience as PlatformDreamforce 2017 - Up close and personal with Lightning Experience as Platform
Dreamforce 2017 - Up close and personal with Lightning Experience as Platform
 
SharePoint, ADFS and Claims Auth
SharePoint, ADFS and Claims AuthSharePoint, ADFS and Claims Auth
SharePoint, ADFS and Claims Auth
 
Website monitoring with Application Insights
Website monitoring with Application InsightsWebsite monitoring with Application Insights
Website monitoring with Application Insights
 
S2 messaging api
S2 messaging apiS2 messaging api
S2 messaging api
 
Introducing the new SharePoint 2013 app model
Introducing the new SharePoint 2013 app modelIntroducing the new SharePoint 2013 app model
Introducing the new SharePoint 2013 app model
 
Building strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsBuilding strong foundations apex enterprise patterns
Building strong foundations apex enterprise patterns
 

Similaire à Watch kit pitfalls. developing iOS app for Dribbble.

Google IO 2017 Recap
Google IO 2017 RecapGoogle IO 2017 Recap
Google IO 2017 RecapVishal Nayak
 
Azure Application insights - An Introduction
Azure Application insights - An IntroductionAzure Application insights - An Introduction
Azure Application insights - An IntroductionMatthias Güntert
 
Logic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsLogic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsSriram Hariharan
 
Adding Identity Management and Access Control to your Application - Exersices
Adding Identity Management and Access Control to your Application - ExersicesAdding Identity Management and Access Control to your Application - Exersices
Adding Identity Management and Access Control to your Application - ExersicesÁlvaro Alonso González
 
Secure your app with keycloak
Secure your app with keycloakSecure your app with keycloak
Secure your app with keycloakGuy Marom
 
Developing Apps with Azure AD
Developing Apps with Azure ADDeveloping Apps with Azure AD
Developing Apps with Azure ADSharePointRadi
 
CNIT 129S: 11: Attacking Application Logic
CNIT 129S: 11: Attacking Application LogicCNIT 129S: 11: Attacking Application Logic
CNIT 129S: 11: Attacking Application LogicSam Bowne
 
Securing SharePoint Apps with OAuth
Securing SharePoint Apps with OAuthSecuring SharePoint Apps with OAuth
Securing SharePoint Apps with OAuthKashif Imran
 
Spring Social - Messaging Friends & Influencing People
Spring Social - Messaging Friends & Influencing PeopleSpring Social - Messaging Friends & Influencing People
Spring Social - Messaging Friends & Influencing PeopleGordon Dickens
 
JS Fest 2018. Тимофей Лавренюк. Делаем веб приложение лучше с помощью совреме...
JS Fest 2018. Тимофей Лавренюк. Делаем веб приложение лучше с помощью совреме...JS Fest 2018. Тимофей Лавренюк. Делаем веб приложение лучше с помощью совреме...
JS Fest 2018. Тимофей Лавренюк. Делаем веб приложение лучше с помощью совреме...JSFestUA
 
API Security - OWASP top 10 for APIs + tips for pentesters
API Security - OWASP top 10 for APIs + tips for pentestersAPI Security - OWASP top 10 for APIs + tips for pentesters
API Security - OWASP top 10 for APIs + tips for pentestersInon Shkedy
 
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Aaron Parecki
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the ApplicationSam Bowne
 
Odata V4 : The New way to REST for Your Applications
Odata V4 : The New way to REST for Your Applications Odata V4 : The New way to REST for Your Applications
Odata V4 : The New way to REST for Your Applications Alok Chhabria
 
Creating a Sign On with Open id connect
Creating a Sign On with Open id connectCreating a Sign On with Open id connect
Creating a Sign On with Open id connectDerek Binkley
 
Microsoft Teams community call - February 2020
Microsoft Teams community call - February 2020Microsoft Teams community call - February 2020
Microsoft Teams community call - February 2020Microsoft 365 Developer
 
Secure rest api on microservices vws2016
Secure rest api on microservices  vws2016Secure rest api on microservices  vws2016
Secure rest api on microservices vws2016Quý Nguyễn Minh
 
Salesforce Spring 23 Webinar
Salesforce Spring 23 WebinarSalesforce Spring 23 Webinar
Salesforce Spring 23 Webinarbrightgenss
 
Kubecon USA 2018: Shopify's $25k bug report and the cluster takeover that did...
Kubecon USA 2018: Shopify's $25k bug report and the cluster takeover that did...Kubecon USA 2018: Shopify's $25k bug report and the cluster takeover that did...
Kubecon USA 2018: Shopify's $25k bug report and the cluster takeover that did...Greg Castle
 

Similaire à Watch kit pitfalls. developing iOS app for Dribbble. (20)

Google IO 2017 Recap
Google IO 2017 RecapGoogle IO 2017 Recap
Google IO 2017 Recap
 
Azure Application insights - An Introduction
Azure Application insights - An IntroductionAzure Application insights - An Introduction
Azure Application insights - An Introduction
 
Logic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsLogic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIs
 
Adding Identity Management and Access Control to your Application - Exersices
Adding Identity Management and Access Control to your Application - ExersicesAdding Identity Management and Access Control to your Application - Exersices
Adding Identity Management and Access Control to your Application - Exersices
 
Secure your app with keycloak
Secure your app with keycloakSecure your app with keycloak
Secure your app with keycloak
 
Developing Apps with Azure AD
Developing Apps with Azure ADDeveloping Apps with Azure AD
Developing Apps with Azure AD
 
CNIT 129S: 11: Attacking Application Logic
CNIT 129S: 11: Attacking Application LogicCNIT 129S: 11: Attacking Application Logic
CNIT 129S: 11: Attacking Application Logic
 
Securing SharePoint Apps with OAuth
Securing SharePoint Apps with OAuthSecuring SharePoint Apps with OAuth
Securing SharePoint Apps with OAuth
 
Spring Social - Messaging Friends & Influencing People
Spring Social - Messaging Friends & Influencing PeopleSpring Social - Messaging Friends & Influencing People
Spring Social - Messaging Friends & Influencing People
 
JS Fest 2018. Тимофей Лавренюк. Делаем веб приложение лучше с помощью совреме...
JS Fest 2018. Тимофей Лавренюк. Делаем веб приложение лучше с помощью совреме...JS Fest 2018. Тимофей Лавренюк. Делаем веб приложение лучше с помощью совреме...
JS Fest 2018. Тимофей Лавренюк. Делаем веб приложение лучше с помощью совреме...
 
API Security - OWASP top 10 for APIs + tips for pentesters
API Security - OWASP top 10 for APIs + tips for pentestersAPI Security - OWASP top 10 for APIs + tips for pentesters
API Security - OWASP top 10 for APIs + tips for pentesters
 
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the Application
 
Odata V4 : The New way to REST for Your Applications
Odata V4 : The New way to REST for Your Applications Odata V4 : The New way to REST for Your Applications
Odata V4 : The New way to REST for Your Applications
 
Creating a Sign On with Open id connect
Creating a Sign On with Open id connectCreating a Sign On with Open id connect
Creating a Sign On with Open id connect
 
Microsoft Teams community call - February 2020
Microsoft Teams community call - February 2020Microsoft Teams community call - February 2020
Microsoft Teams community call - February 2020
 
Secure rest api on microservices vws2016
Secure rest api on microservices  vws2016Secure rest api on microservices  vws2016
Secure rest api on microservices vws2016
 
Salesforce Spring 23 Webinar
Salesforce Spring 23 WebinarSalesforce Spring 23 Webinar
Salesforce Spring 23 Webinar
 
Revue des annonces WWDC2015
Revue des annonces WWDC2015Revue des annonces WWDC2015
Revue des annonces WWDC2015
 
Kubecon USA 2018: Shopify's $25k bug report and the cluster takeover that did...
Kubecon USA 2018: Shopify's $25k bug report and the cluster takeover that did...Kubecon USA 2018: Shopify's $25k bug report and the cluster takeover that did...
Kubecon USA 2018: Shopify's $25k bug report and the cluster takeover that did...
 

Plus de Agilie Team

B2B media content broadcast and live streaming
B2B media content broadcast and live streamingB2B media content broadcast and live streaming
B2B media content broadcast and live streamingAgilie Team
 
9 заповедей ux-аниматора
9 заповедей ux-аниматора9 заповедей ux-аниматора
9 заповедей ux-аниматораAgilie Team
 
Как взять и удержать проект
Как взять и удержать проектКак взять и удержать проект
Как взять и удержать проектAgilie Team
 
The second step in interface design
The second step in interface designThe second step in interface design
The second step in interface designAgilie Team
 
Как стать игроком большой команды
Как стать игроком большой командыКак стать игроком большой команды
Как стать игроком большой командыAgilie Team
 
Ошибки проектирования дизайна с точки зрения SEO-оптимизации
Ошибки проектирования дизайна с точки зрения SEO-оптимизацииОшибки проектирования дизайна с точки зрения SEO-оптимизации
Ошибки проектирования дизайна с точки зрения SEO-оптимизацииAgilie Team
 
Фрилансер: помоги себе сам
Фрилансер: помоги себе самФрилансер: помоги себе сам
Фрилансер: помоги себе самAgilie Team
 
Прото типо типирование
Прото типо типированиеПрото типо типирование
Прото типо типированиеAgilie Team
 
New designer's tool for promotion shot bucket
New designer's tool for promotion shot bucketNew designer's tool for promotion shot bucket
New designer's tool for promotion shot bucketAgilie Team
 
Эволюция внутренних процессов в большой команде
Эволюция внутренних процессов в большой командеЭволюция внутренних процессов в большой команде
Эволюция внутренних процессов в большой командеAgilie Team
 
The past of modern design
The past of modern designThe past of modern design
The past of modern designAgilie Team
 
User centered design
User centered designUser centered design
User centered designAgilie Team
 
Mobile apps for restaurants business
Mobile apps for restaurants businessMobile apps for restaurants business
Mobile apps for restaurants businessAgilie Team
 

Plus de Agilie Team (13)

B2B media content broadcast and live streaming
B2B media content broadcast and live streamingB2B media content broadcast and live streaming
B2B media content broadcast and live streaming
 
9 заповедей ux-аниматора
9 заповедей ux-аниматора9 заповедей ux-аниматора
9 заповедей ux-аниматора
 
Как взять и удержать проект
Как взять и удержать проектКак взять и удержать проект
Как взять и удержать проект
 
The second step in interface design
The second step in interface designThe second step in interface design
The second step in interface design
 
Как стать игроком большой команды
Как стать игроком большой командыКак стать игроком большой команды
Как стать игроком большой команды
 
Ошибки проектирования дизайна с точки зрения SEO-оптимизации
Ошибки проектирования дизайна с точки зрения SEO-оптимизацииОшибки проектирования дизайна с точки зрения SEO-оптимизации
Ошибки проектирования дизайна с точки зрения SEO-оптимизации
 
Фрилансер: помоги себе сам
Фрилансер: помоги себе самФрилансер: помоги себе сам
Фрилансер: помоги себе сам
 
Прото типо типирование
Прото типо типированиеПрото типо типирование
Прото типо типирование
 
New designer's tool for promotion shot bucket
New designer's tool for promotion shot bucketNew designer's tool for promotion shot bucket
New designer's tool for promotion shot bucket
 
Эволюция внутренних процессов в большой команде
Эволюция внутренних процессов в большой командеЭволюция внутренних процессов в большой команде
Эволюция внутренних процессов в большой команде
 
The past of modern design
The past of modern designThe past of modern design
The past of modern design
 
User centered design
User centered designUser centered design
User centered design
 
Mobile apps for restaurants business
Mobile apps for restaurants businessMobile apps for restaurants business
Mobile apps for restaurants business
 

Watch kit pitfalls. developing iOS app for Dribbble.

  • 1. WatchKit Pitfalls Developing iOS App for Dribbble Zgonik Vova
  • 2. Register your application • Website URL • Callback URL • Client ID • Client Secret • Client Access Token https://dribbble.com/account/applications/new
  • 3. OAuth2 solutions NXOauth2Client GTMOAuth2 • Detailed error handling • Block callbacks • No response body on auth error • NSNotificationCenter
  • 4. Dribbble API understanding of HTTP response codes 422 Unprocessable Entity 400 Bad request 500 Internal server error 403 Operation is forbidden • upload shot or attachment without mimeType • follow more than 1800 followers • follow own userId • incorrect parameter name • upload limit: - 48 shots per month - 5 shots per day • access denied (canUplodShot = NO) 429 Too many requests 304 Content not modified 404 Not found 204 No content API restrictions: • 60 requests per minute • 10000 requests per day • no like shot, like comment transaction entry found • no following transaction entry «A follows B» found • presence of transaction entry for user «A follows user B» • response on delete request for: like comment, like shot • if the resource has not changed in conditional request with parameter If-Modified-Since • POST incorrect JSON
  • 5.
  • 6. Requests Rate Limiting low-priority • check if like shot • check if follow user • 60 per minute • 10000 per day high-priority • account request • switch & load category of shots • like shot • follow user
  • 8. watchOS App WatchKit App WatchKit app Target Storyboard Resources WatchKit Extension WatchKit extension target WatchKit code and Resources WatchKit App IOS App iOS app target iOS Code WatchKit Extension WatchKit app stores on watch device and consist of storyboard and static resources (images, fonts) WatchKit Extension stores on iPhone and consist of source and resources all source executes on iPhone, without iPhone Watch app won’t launch
  • 9. NOT SURE OF WHAT IS GOING ON HERE
  • 10. iPhone Extension Communication Glance Notification WKInterfaceController Apple Watch WatchKit App Storyboard Resources WatchKit Extension Code Resources WatchKitWatchKit
  • 11. WatchKit Launch Flow Launch WatchKit APP Load initial interface controller Initialize UI Display UI Storyboard Interface controller init willActivate • user launches app on watch • watchKit finds initial controller in storyboard and notifies iPhone • watchKit Extension should be launched and specified class of controller is instantinated WatchKit Extension
  • 12.
  • 13. Glance • no interactive items: buttons, switches • no vertical scrolling • San Francisco system font only • Apple doesn’t recommend use maps and tables
  • 14. Notification short look • no interactive items: buttons, switches, sliders • allow different typefaces of system font • allow change tint color with app Name
  • 15. Notification long look system stuff application content action defined in watch app two types activation mode: background & foreground
  • 16. • openParentApplication:reply: • App Groups • Darwin-notification • Handoff WatchKit Extension and App Communication Communication • model classes, web services, credentials • restricted API: ! any API marked with NS_EXTENSION_UNAVAILABLE ! calls to UIApplication +sharedApplication ! access the camera or microphone on an iOS device ! receive data using AirDrop Sharing code
  • 17. openParentApplication API on watch App [WKInterfaceController openParentApplication:reply:] API on main application: implement (:handleWatchKitExtensionRequest:reply:) • main app launches in background • error handling available - slower than other methods + API calls time increases - objects should conform <NSCoding>
  • 18. App Groups • com.apple.security.application-groups entitlement • initWithSuiteName: (NSUserDefaults) • containerURLForSecurityApplicationGroupIdentifier: (NSFileManager) - main app can’t notify watch about new data
  • 19. Darwin-notifications Exchange messages between processes in iOS by means of Darwin-notifications pod ‘MMWormHole’ Sending process Notification notifyd routines allow processes to exchange stateless notification events process 1 process 2 process 3 Client processesnotification is just a signal it can't transport any data apart from the notification identifier
  • 20. Handoff • NSUserActivity in main app’s Info.plist • perform updateUserActivity:userInfo:webpageURL: in WKInterfaceController • handle activity event in AppDelegate: - application:willContinueUserActivity - application:continueUserActivity:restorationHandler
  • 22. ApiClient AppDelegate ShotsViewController WKInterfaceControllerWatch App Main App Core structure ShotsController Data source Networking ShotBucketCore Framework App Models Oauth2Clients Api Clients ActionManager
  • 24. . . . . . . . . . Gallery on WatchKit reloadRootControllersWithNames: contexts: swipe Initial Interface Controller swipe 12:0012-0012-00 12-00 Load more Modal controller 12-00Close ContentContent More pictures?
  • 25. Page-based Controller Life Cycle Changes
  • 26.
  • 27. Smart personalized notifications without backend Background fetch Conditional request Last-Modified: Sat, 22 Feb 2014 17:10:33 GMT HTTP/1.1 304 Not ModifiedHTTP/1.1 200 OK Local notification No action
  • 28. BG Fetch issues - [UIApplication performFetchWithCompletionHandler:] UIBackgroundFetchResult • UIBackgroundFetchResultNewData • UIBackgroundFetchResultNoData • UIBackgroundFetchResultFailed
  • 29.