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
87
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
570
Fun With Auto Layout
chucks
0
120
Introducing Skateway 2.0
chucks
0
45
Other Decks in Programming
See All in Programming
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
320
Blazing Fast UI Development with Compose Hot Reload (droidcon New York 2025)
zsmb
1
220
型付きアクターモデルがもたらす分散シミュレーションの未来
piyo7
0
810
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
160
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
280
ニーリーにおけるプロダクトエンジニア
nealle
0
490
童醫院敏捷轉型的實踐經驗
cclai999
0
190
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
250
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
210
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
190
WindowInsetsだってテストしたい
ryunen344
1
190
deno-redisの紹介とJSRパッケージの運用について (toranoana.deno #21)
uki00a
0
150
Featured
See All Featured
Building an army of robots
kneath
306
45k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Embracing the Ebb and Flow
colly
86
4.7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
790
Become a Pro
speakerdeck
PRO
28
5.4k
Facilitating Awesome Meetings
lara
54
6.4k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.6k
Making Projects Easy
brettharned
116
6.3k
Done Done
chrislema
184
16k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.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