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
81
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
450
Fun With Auto Layout
chucks
0
110
Introducing Skateway 2.0
chucks
0
35
Other Decks in Programming
See All in Programming
期限が近づいてきた!Privacy Manifests対応
ryunakayama
5
3.1k
Не учите алгоритмы
hellsquirrel
1
700
Cloudflare Workersの環境を再現することについて
yusukebe
5
730
C#でのPlaywrightを使ったE2Eテストの実際
tomokusaba
0
210
ISUCONってなんだか難しそう……!!でも、初めてのISUCONにPHPで挑戦してきました!
kotomin_m
0
260
WasmOS: Wasmを実行する自作Microkernel
riru
0
360
Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
850
私がエッジを使う理由
chimame
9
3.6k
PHP で読む楽しいコアダンプ
sji
0
220
htmx is fun!
codehex
2
170
Crafting a Own PHP - ウキウキ手作りミニマリストPHP
uzulla
4
960
25 Years of the JCP Program
ivargrimstad
0
1k
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
92
4.7k
From Idea to $5000 a Month in 5 Months
shpigford
376
45k
The World Runs on Bad Software
bkeepers
PRO
60
6.6k
Build your cross-platform service in a week with App Engine
jlugia
223
17k
Documentation Writing (for coders)
carmenintech
59
3.7k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
111
35k
Git: the NoSQL Database
bkeepers
PRO
421
63k
The Mythical Team-Month
searls
214
42k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
355
22k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3k
Automating Front-end Workflow
addyosmani
1353
200k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
185
15k
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