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
84
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
550
Fun With Auto Layout
chucks
0
120
Introducing Skateway 2.0
chucks
0
44
Other Decks in Programming
See All in Programming
Amazon Nova Reelの可能性
hideg
0
260
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
150
Scaling your build logic
antalmonori
1
150
知られざるDMMデータエンジニアの生態 〜かつてツチノコと呼ばれし者〜
takaha4k
3
1.1k
ASP. NET CoreにおけるWebAPIの最新情報
tomokusaba
0
210
WebDriver BiDiとは何なのか
yotahada3
1
100
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
0
230
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
350
[JAWS-UG横浜 #80] うわっ…今年のServerless アップデート、少なすぎ…?
maroon1st
0
150
社内フレームワークとその依存性解決 / in-house framework and its dependency management
vvakame
1
500
動作確認やテストで漏れがちな観点3選
starfish719
5
870
オニオンアーキテクチャを使って、 Unityと.NETでコードを共有する
soi013
0
390
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
11
900
Embracing the Ebb and Flow
colly
84
4.5k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
BBQ
matthewcrist
85
9.4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
A better future with KSS
kneath
238
17k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Documentation Writing (for coders)
carmenintech
67
4.6k
The Language of Interfaces
destraynor
156
24k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
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