SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
Fail better
CocoaHeads Paris
“Ever tried. Ever failed. No matter.Try Again. Fail again. Fail better.”
Samuel Beckett
vendredi 12 avril 13
presentError:
vendredi 12 avril 13
Introduced in Mac OS 10.4
vendredi 12 avril 13
-[NSResponder presentError:]
vendredi 12 avril 13
Follows the responder chain
vendredi 12 avril 13
vendredi 12 avril 13
-[NSResponder willPresentError:]
vendredi 12 avril 13
From http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/
ErrorHandlingCocoa/ErrorHandling/ErrorHandling.html
vendredi 12 avril 13
From http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/
ErrorHandlingCocoa/ErrorHandling/ErrorHandling.html
vendredi 12 avril 13
Why so cool?
vendredi 12 avril 13
Contextualization!
vendredi 12 avril 13
1. Level of information
2.Visual context
vendredi 12 avril 13
1. Level of information
“I want errors precise, but still
understandable”
vendredi 12 avril 13
➤ generate precise errors
➤ rewrite errors for to the context
vendredi 12 avril 13
2. Visual context
“Where did this error occur?”
vendredi 12 avril 13
➤ embedding errors in the UI
vendredi 12 avril 13
vendredi 12 avril 13
vendredi 12 avril 13
Available on
UIResponder too !
vendredi 12 avril 13
Available on
UIResponder too !
vendredi 12 avril 13
Re-implement!
vendredi 12 avril 13
Demo
vendredi 12 avril 13
Links
github.com/kemenaran/ios-presentError
github.com/hectr/ErrorKit
vendredi 12 avril 13
pierre@capitainetrain.com
vendredi 12 avril 13
Thanks
vendredi 12 avril 13

Contenu connexe

Plus de CocoaHeads France

Plus de CocoaHeads France (20)

L'intégration continue avec Bitrise
L'intégration continue avec BitriseL'intégration continue avec Bitrise
L'intégration continue avec Bitrise
 
Super combinators
Super combinatorsSuper combinators
Super combinators
 
Design like a developer
Design like a developerDesign like a developer
Design like a developer
 
Handle the error
Handle the errorHandle the error
Handle the error
 
Quoi de neuf dans iOS 10.3
Quoi de neuf dans iOS 10.3Quoi de neuf dans iOS 10.3
Quoi de neuf dans iOS 10.3
 
IoT Best practices
 IoT Best practices IoT Best practices
IoT Best practices
 
SwiftyGPIO
SwiftyGPIOSwiftyGPIO
SwiftyGPIO
 
Présentation de HomeKit
Présentation de HomeKitPrésentation de HomeKit
Présentation de HomeKit
 
Programme MFI retour d'expérience
Programme MFI retour d'expérienceProgramme MFI retour d'expérience
Programme MFI retour d'expérience
 
How to communicate with Smart things?
How to communicate with Smart things?How to communicate with Smart things?
How to communicate with Smart things?
 
Build a lego app with CocoaPods
Build a lego app with CocoaPodsBuild a lego app with CocoaPods
Build a lego app with CocoaPods
 
Let's migrate to Swift 3.0
Let's migrate to Swift 3.0Let's migrate to Swift 3.0
Let's migrate to Swift 3.0
 
Project Entourage
Project EntourageProject Entourage
Project Entourage
 
What's new in iOS9
What's new in iOS9What's new in iOS9
What's new in iOS9
 
BitTorrent on iOS
BitTorrent on iOSBitTorrent on iOS
BitTorrent on iOS
 
CloudKit as a backend
CloudKit as a backendCloudKit as a backend
CloudKit as a backend
 
Comment faire de HLS votre solution vidéo préférée ?
Comment faire de HLS votre solution vidéo préférée ?Comment faire de HLS votre solution vidéo préférée ?
Comment faire de HLS votre solution vidéo préférée ?
 
Découvrir dtrace en ligne de commande.
Découvrir dtrace en ligne de commande.Découvrir dtrace en ligne de commande.
Découvrir dtrace en ligne de commande.
 
Un retour d'expérience sur Apple Pay
Un retour d'expérience sur Apple PayUn retour d'expérience sur Apple Pay
Un retour d'expérience sur Apple Pay
 
Alamofire
AlamofireAlamofire
Alamofire
 

Fail better