Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Using KSScreenshotManager
Search
Chuck Shnider
June 16, 2013
Programming
0
82
Using KSScreenshotManager
Slides from my talk at Ottawa Cocoaheads on March 14, 2013.
Chuck Shnider
June 16, 2013
Tweet
Share
More Decks by Chuck Shnider
See All by Chuck Shnider
A look back at GameDev on Apple II
chucks
0
510
Fun With Auto Layout
chucks
0
110
Introducing Skateway 2.0
chucks
0
41
Other Decks in Programming
See All in Programming
GraphQL あるいは React における自律的なデータ取得について
quramy
11
3k
Google Sign-inの移行から始めるCredential Manager活用
clockvoid
0
430
Patched fetch did not work
quramy
4
410
rbs-inlineを導入してYARDからRBSに移行する
euglena1215
1
300
XStateでReactに秩序を与えたい
gizm000
0
740
o1モデルのプロンプトエンジニアリングって?
ktc_wada
0
310
大公開!iOS開発の悩みトップ5 〜iOSDC Japan 2024〜
ryunakayama
0
190
状態管理ライブラリZustandの導入から運用まで
k1tikurisu
3
470
Lessons by WebAssembly app in production on CDN Edge Computing Service
tetsuharuohzeki
0
220
Desafios e Lições Aprendidas na Migração de Monólitos para Microsserviços em Java
jessilyneh
2
150
Using Livebook to build and deploy internal tools @ ElixirConf 2024
hugobarauna
0
250
Jakarta EE meets AI
ivargrimstad
0
400
Featured
See All Featured
Scaling GitHub
holman
458
140k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
326
21k
It's Worth the Effort
3n
182
27k
Design by the Numbers
sachag
277
19k
A Tale of Four Properties
chriscoyier
155
22k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
How To Stay Up To Date on Web Technology
chriscoyier
786
250k
A better future with KSS
kneath
235
17k
Build The Right Thing And Hit Your Dates
maggiecrowley
30
2.3k
Principles of Awesome APIs and How to Build Them.
keavy
125
16k
Git: the NoSQL Database
bkeepers
PRO
425
64k
For a Future-Friendly Web
brad_frost
174
9.3k
Transcript
KSScreenshotManager Chuck Shnider twi er: @cshnider ∑
It starts small enough…
None
None
None
None
We’re Gonna Need a Bigger Slide…
None
Production Work
Heaven forbid you have to update them later!
KSScreenshotManager wri en by Kent Sutherland from Flexibits twi er:
@KSuther
@KSuther
h ps://github.com/ksuther/KSScreenshotManager Open-Source
KSScreenshotManager •Make your code generate the screenshots •Fully-Automated •Runnable from
scripting environments •Sample Python Script included •Uses “WaxSim” to drive the iOS Simulator
Like Test Automation •Not “For Free” •Cheaper to repeat over
time •Effort scales more slowly than manual screenshots
Modifying Your Code •WARNING Private API Usage! •Make sure none
of this ships to the AppStore •Conditional Compile and perhaps use a new target
Modifying Your Code •Add KSScreenshotManager and KSScreenshotAction.h / .m to
your project. #de ne CREATING_SCREENSHOTS
Modifying Your Code •Create a subclass of KSScreenshotManager •Override -(void)setupScreenshotActions;
setupScreenshotActions •Create instances of KSScreenshotAction •block-based API with optional cleanup
blocks •synch or async, status bar or no [self addScreenshotAction:newAction];
KSScreenshotAction block •Get the app to the correct state •Cheat
as necessary •Fake Data, Mock Objects, etc. •Private APIs, both app and OS
AppDelegate Changes #if CREATING_SCREENSHOTS dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 *
NSEC_PER_SEC)); dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ MyScreenshotManager *screenshotManager = [[MyScreenshotManager alloc] init]; [screenshotManager setTableViewController:viewController]; [screenshotManager takeScreenshots]; }); #endif
Demo