SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
NSLog? Build&Run much?
And otherwise?
Pit Garbe, 11.07.2013
Montag, 29. Juli 13
UI Debugging
• instead of logging und iteratively changing the UI
• better use the helicopter vantage point
• be able to change parts of the UI in a running App
• (sometimes) even pull in the changes into code
• find mistakes, bugs, potential performance issues
Montag, 29. Juli 13
How do you do it?
• in the beginning there was NSLog, or more
advanced: CocoaLumberjack (DDLog)
• to log something different, you’d often have to
build and run
• to log UI stuff, you’d have to write inconvenient,
long log statements, that are hard to read in code as
well as in their output
• sometimes quite useless (debugging graphics with
text??)
Montag, 29. Juli 13
NSLogger
• https://github.com/fpillet/NSLogger
• nice performance log client, that also displays
images, NSData, log level, markers and does
remote logging (look mom, no cable!)
• there is a bridge to send all your DDLog lines to
NSLogger
• still mostly text based, needs many build & run
cycles if you want to log new stuff
Montag, 29. Juli 13
Montag, 29. Juli 13
DCIntrospect
• https://github.com/domesticcatsoftware/
DCIntrospect
• oldest tool I’m aware of (~ 2 years)
• to be used in the running App (in the Simulator)
• controlled by keyboard and touch input
•pod 'DCIntrospect', '~> 0.0.2'
Montag, 29. Juli 13
DCIntrospect
In AppDelegate.m
#import <DCIntrospect/DCIntrospect.h>
in appDidFinishLaunching…,
after makeKeyAndVisible:
#if TARGET_IPHONE_SIMULATOR
[[DCIntrospect sharedIntrospector] start];
#endif
The rest will be explained in the OSD help screen.
Montag, 29. Juli 13
DCIntrospect
• to be used mostly in the Simulator becaus of keyboard input
• but some parts can be used on the device
• highlight views, show views origin & size (with distance to window)
• move views around, change their sizes
• log view properties (incl. subviews, actions, targets)
• log accessibility properties
• manuelly call setNeedsDisplay, setNeedsLayout and reloadData
• highlight all the view outlines
• highlight all transparent views
• warn of misaligned views
• print view hierarchy
• free
• a lot of forks on GitHub, that are much younger (no idea, which to use)
Montag, 29. Juli 13
DCIntrospect
Montag, 29. Juli 13
PonyDebugger
• https://github.com/square/PonyDebugger
• pod 'PonyDebugger'
• with Chrome Developer Tools
• View Hierarchie (as XML), editable
• analyze network traffic
• remote logging and introspection (like NSLog but with expandable
objects that don’t clutter the screen unless you want to)
• Core Data browser
• iOS 5 +
• free
Montag, 29. Juli 13
Spark Inspector
• http://www.sparkinspector.com/
• 3D presentation of view hierarchy
• show (all) notifications (can be filtered of course), can resend them
• live updating the current screen of the App
• all views and their properties, all the way down to CALayer
transform can be edited on the fly
• uses swizzling (App Store safe, but you don’t want to leave it in
anyway)
• OS X 10.8+, iOS 5+
• $ 39.99 or  30 day trial
Montag, 29. Juli 13
Spark Inspector
• assistant helps to setup with your project (if you don’t like that, use
CocoaPods) 
• Device or Simulator
• system views can be hidden
• rotation of 3D view can be attached to device orientation
• can disable clip to bounds, i.e. myou can see outside the screen
border and also see how much a view renders but ultimately clips
away
Montag, 29. Juli 13
Montag, 29. Juli 13
Reveal
• http://revealapp.com
• pod 'Reveal-iOS-SDK'
• 2D/3D presentation of view hierarchy
• no live updating, only manual snapshot
• change view properties on the fly
• collapse subviews for less clutter, where you need it
• good for accessibility, VoiceOver tests
• Device or Simulator
• currently in Beta, try for free
• OS X 10.8+, iOS 6
Montag, 29. Juli 13
Montag, 29. Juli 13
Spark Inspector VS Reveal
Spark Inspector Reveal
min iOS version iOS 5 iOS 6
3D Yes Yes
change distance of layers Yes Yes
hide system views Yes –
Notifications Track all, send selected again –
disable clipping Yes –
Live Updating Yes –
Uses Swizzling Yes No
Price $ 39.99 (30 day trial) Beta, free
Montag, 29. Juli 13
XRay Editor (+Probe)
XRay Editor  http://mireus.com/xrayeditor/
• change view properties in running App
• can show a design overlay
• $24.99 Launch Sale
• 14 day trial
“Lite Edition”:
XRay Probe http://mireus.com/xrayprobe/
• show layout of running App (2D)
• $11.99 Launch Sale
• 14 day trial
Montag, 29. Juli 13
XRay Editor (+Probe)
pod 'XRay', '~> 1.2' 
insert in AppDelegate:
#import <XRay/XRay.h>
•didn’t work with CocoaPods, worked manually
•scrolling inside big UIScrollview upsets XRay Editor (in a
strange and interfering way)
•works on device as well
•iOS 5+
•there is an Xcode plugin, that allows to insert the changes you
made to the running App into your code
Montag, 29. Juli 13
Hierarchy Detective
• http://hierarchydetective.com
• https://github.com/chinmaygarde/hierarchydetective
• designed to be extended by modules, currently supports
UIKit, CALayer, cocos2d
• In the Wiki you can find info
how to support more view
hierarchy types
• didn’t try it yet
Montag, 29. Juli 13
Demo
Montag, 29. Juli 13

Mais conteúdo relacionado

Mais procurados

November.2015.RealityBasedUI
November.2015.RealityBasedUINovember.2015.RealityBasedUI
November.2015.RealityBasedUI
Reuben Ahmed
 
Chrome game programming_with_for_play
Chrome game programming_with_for_playChrome game programming_with_for_play
Chrome game programming_with_for_play
firenze-gtug
 
Writing 3D Applications Using ruby-processing
Writing 3D Applications Using ruby-processingWriting 3D Applications Using ruby-processing
Writing 3D Applications Using ruby-processing
Preston Lee
 

Mais procurados (8)

Unity Visual Effect Graph
Unity Visual Effect GraphUnity Visual Effect Graph
Unity Visual Effect Graph
 
November.2015.RealityBasedUI
November.2015.RealityBasedUINovember.2015.RealityBasedUI
November.2015.RealityBasedUI
 
Chrome game programming_with_for_play
Chrome game programming_with_for_playChrome game programming_with_for_play
Chrome game programming_with_for_play
 
Lib gdx 2015_corkdevio
Lib gdx 2015_corkdevioLib gdx 2015_corkdevio
Lib gdx 2015_corkdevio
 
West Coast DevCon 2014: Build Automation - Epic’s Build Tools & Infrastructure
West Coast DevCon 2014: Build Automation - Epic’s Build Tools & InfrastructureWest Coast DevCon 2014: Build Automation - Epic’s Build Tools & Infrastructure
West Coast DevCon 2014: Build Automation - Epic’s Build Tools & Infrastructure
 
PhoneGap in 60 Minutes or Less
PhoneGap in 60 Minutes or LessPhoneGap in 60 Minutes or Less
PhoneGap in 60 Minutes or Less
 
Writing 3D Applications Using ruby-processing
Writing 3D Applications Using ruby-processingWriting 3D Applications Using ruby-processing
Writing 3D Applications Using ruby-processing
 
Introducing Honeycomb
Introducing HoneycombIntroducing Honeycomb
Introducing Honeycomb
 

Semelhante a UI Debugging - Cocoaheads Dresden (English)

Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present future
lolopetit
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy Virin
CocoaHeads France
 

Semelhante a UI Debugging - Cocoaheads Dresden (English) (20)

Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
 
Sikuli
SikuliSikuli
Sikuli
 
Stackato v5
Stackato v5Stackato v5
Stackato v5
 
Esug java
Esug javaEsug java
Esug java
 
Untangling - fall2017 - week6
Untangling - fall2017 - week6Untangling - fall2017 - week6
Untangling - fall2017 - week6
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present future
 
Is it possible to write cross-native apps in 2020 ?
Is it possible to write cross-native apps in 2020 ?Is it possible to write cross-native apps in 2020 ?
Is it possible to write cross-native apps in 2020 ?
 
Saving Money with Open Source GIS
Saving Money with Open Source GISSaving Money with Open Source GIS
Saving Money with Open Source GIS
 
Rapid Game Development with RUby and Gosu – Ruby Manor 4
Rapid Game Development with RUby and Gosu – Ruby Manor 4Rapid Game Development with RUby and Gosu – Ruby Manor 4
Rapid Game Development with RUby and Gosu – Ruby Manor 4
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
september13.ppt
september13.pptseptember13.ppt
september13.ppt
 
Stackato v6
Stackato v6Stackato v6
Stackato v6
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy Virin
 
Off the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your OrganizationOff the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your Organization
 
Mirror - Android UI development on steroids
Mirror - Android UI development on steroidsMirror - Android UI development on steroids
Mirror - Android UI development on steroids
 
From Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEFrom Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDE
 
Head first android apps dev tools
Head first android apps dev toolsHead first android apps dev tools
Head first android apps dev tools
 
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
 
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3DFrom Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
 
RobotStudiopp.ppt
RobotStudiopp.pptRobotStudiopp.ppt
RobotStudiopp.ppt
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

UI Debugging - Cocoaheads Dresden (English)

  • 1. NSLog? Build&Run much? And otherwise? Pit Garbe, 11.07.2013 Montag, 29. Juli 13
  • 2. UI Debugging • instead of logging und iteratively changing the UI • better use the helicopter vantage point • be able to change parts of the UI in a running App • (sometimes) even pull in the changes into code • find mistakes, bugs, potential performance issues Montag, 29. Juli 13
  • 3. How do you do it? • in the beginning there was NSLog, or more advanced: CocoaLumberjack (DDLog) • to log something different, you’d often have to build and run • to log UI stuff, you’d have to write inconvenient, long log statements, that are hard to read in code as well as in their output • sometimes quite useless (debugging graphics with text??) Montag, 29. Juli 13
  • 4. NSLogger • https://github.com/fpillet/NSLogger • nice performance log client, that also displays images, NSData, log level, markers and does remote logging (look mom, no cable!) • there is a bridge to send all your DDLog lines to NSLogger • still mostly text based, needs many build & run cycles if you want to log new stuff Montag, 29. Juli 13
  • 6. DCIntrospect • https://github.com/domesticcatsoftware/ DCIntrospect • oldest tool I’m aware of (~ 2 years) • to be used in the running App (in the Simulator) • controlled by keyboard and touch input •pod 'DCIntrospect', '~> 0.0.2' Montag, 29. Juli 13
  • 7. DCIntrospect In AppDelegate.m #import <DCIntrospect/DCIntrospect.h> in appDidFinishLaunching…, after makeKeyAndVisible: #if TARGET_IPHONE_SIMULATOR [[DCIntrospect sharedIntrospector] start]; #endif The rest will be explained in the OSD help screen. Montag, 29. Juli 13
  • 8. DCIntrospect • to be used mostly in the Simulator becaus of keyboard input • but some parts can be used on the device • highlight views, show views origin & size (with distance to window) • move views around, change their sizes • log view properties (incl. subviews, actions, targets) • log accessibility properties • manuelly call setNeedsDisplay, setNeedsLayout and reloadData • highlight all the view outlines • highlight all transparent views • warn of misaligned views • print view hierarchy • free • a lot of forks on GitHub, that are much younger (no idea, which to use) Montag, 29. Juli 13
  • 10. PonyDebugger • https://github.com/square/PonyDebugger • pod 'PonyDebugger' • with Chrome Developer Tools • View Hierarchie (as XML), editable • analyze network traffic • remote logging and introspection (like NSLog but with expandable objects that don’t clutter the screen unless you want to) • Core Data browser • iOS 5 + • free Montag, 29. Juli 13
  • 11. Spark Inspector • http://www.sparkinspector.com/ • 3D presentation of view hierarchy • show (all) notifications (can be filtered of course), can resend them • live updating the current screen of the App • all views and their properties, all the way down to CALayer transform can be edited on the fly • uses swizzling (App Store safe, but you don’t want to leave it in anyway) • OS X 10.8+, iOS 5+ • $ 39.99 or  30 day trial Montag, 29. Juli 13
  • 12. Spark Inspector • assistant helps to setup with your project (if you don’t like that, use CocoaPods)  • Device or Simulator • system views can be hidden • rotation of 3D view can be attached to device orientation • can disable clip to bounds, i.e. myou can see outside the screen border and also see how much a view renders but ultimately clips away Montag, 29. Juli 13
  • 14. Reveal • http://revealapp.com • pod 'Reveal-iOS-SDK' • 2D/3D presentation of view hierarchy • no live updating, only manual snapshot • change view properties on the fly • collapse subviews for less clutter, where you need it • good for accessibility, VoiceOver tests • Device or Simulator • currently in Beta, try for free • OS X 10.8+, iOS 6 Montag, 29. Juli 13
  • 16. Spark Inspector VS Reveal Spark Inspector Reveal min iOS version iOS 5 iOS 6 3D Yes Yes change distance of layers Yes Yes hide system views Yes – Notifications Track all, send selected again – disable clipping Yes – Live Updating Yes – Uses Swizzling Yes No Price $ 39.99 (30 day trial) Beta, free Montag, 29. Juli 13
  • 17. XRay Editor (+Probe) XRay Editor  http://mireus.com/xrayeditor/ • change view properties in running App • can show a design overlay • $24.99 Launch Sale • 14 day trial “Lite Edition”: XRay Probe http://mireus.com/xrayprobe/ • show layout of running App (2D) • $11.99 Launch Sale • 14 day trial Montag, 29. Juli 13
  • 18. XRay Editor (+Probe) pod 'XRay', '~> 1.2'  insert in AppDelegate: #import <XRay/XRay.h> •didn’t work with CocoaPods, worked manually •scrolling inside big UIScrollview upsets XRay Editor (in a strange and interfering way) •works on device as well •iOS 5+ •there is an Xcode plugin, that allows to insert the changes you made to the running App into your code Montag, 29. Juli 13
  • 19. Hierarchy Detective • http://hierarchydetective.com • https://github.com/chinmaygarde/hierarchydetective • designed to be extended by modules, currently supports UIKit, CALayer, cocos2d • In the Wiki you can find info how to support more view hierarchy types • didn’t try it yet Montag, 29. Juli 13