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
Xcode & fastlane で iOS アプリのスクショ撮影を自動化しよう!
Search
Tomoki Kobayashi
August 20, 2018
Technology
3
1k
Xcode & fastlane で iOS アプリのスクショ撮影を自動化しよう!
Nagoya iOS meetup Vol.4 での発表資料です。
https://nagoya-ios-meetup.connpass.com/event/95974/
Tomoki Kobayashi
August 20, 2018
Tweet
Share
More Decks by Tomoki Kobayashi
See All by Tomoki Kobayashi
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
320
Liquid Glass を Metal Shader で描きたいだけの人生だった…
temoki
0
12
Skip Skip Run Run Run ♫
temoki
0
640
さようならRxSwift こんにちは*****
temoki
1
390
Androidで不安定なPlatform Viewsとの闘い
temoki
0
900
iOSパッケージマネージャー奮闘記 完結編
temoki
2
590
事業譲渡を受けたアプリとの統合で失敗、 そしてユーザーからの評価回復に至るまで
temoki
1
640
Apple Vision Proデベロッパラボに参加してきた
temoki
0
490
年末年始の成果、そして現状の紹介
temoki
0
210
Other Decks in Technology
See All in Technology
Generative AI Japan 第一回生成AI実践研究会「AI駆動開発の現在地──ブレイクスルーの鍵を握るのはデータ領域」
shisyu_gaku
0
240
AIのグローバルトレンド2025 #scrummikawa / global ai trend
kyonmm
PRO
1
280
会社紹介資料 / Sansan Company Profile
sansan33
PRO
6
380k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
8.7k
S3アクセス制御の設計ポイント
tommy0124
3
200
複数サービスを支えるマルチテナント型Batch MLプラットフォーム
lycorptech_jp
PRO
0
370
250905 大吉祥寺.pm 2025 前夜祭 「プログラミングに出会って20年、『今』が1番楽しい」
msykd
PRO
1
900
オブザーバビリティが広げる AIOps の世界 / The World of AIOps Expanded by Observability
aoto
PRO
0
380
【NoMapsTECH 2025】AI Edge Computing Workshop
akit37
0
120
自作JSエンジンに推しプロポーザルを実装したい!
sajikix
1
180
20250910_障害注入から効率的復旧へ_カオスエンジニアリング_生成AIで考えるAWS障害対応.pdf
sh_fk2
3
260
人工衛星のファームウェアをRustで書く理由
koba789
15
7.9k
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
520
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
Balancing Empowerment & Direction
lara
3
620
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Transcript
Xcode & fastlane iOS iOS meetup Nagoya
@temoki Fenrir Inc. / PL, iOS Engineer Mobile Act NAGOYA
/
VanApp Fenrir Van = Fenrir
Fenrir VanApp iOS https://vanapp.com/dokidokiglass
Swift (2015 ) ObjectiveC Swift4 iPhone X
1. UI 2. UI Accessibility Identifier 3. UI 4.
UI Xcode 7 UI Test Unit Test UI Test
Accessibility Identifier UI Storyboard Accessibility Identifier
class UITestsForScreenshot: XCTestCase { override func setUp() { super.setUp() }
override func tearDown() { super.tearDown() } func testForScreenshot() { // UI }
// let app = XCUIApplication() app.launch() // UI Accessibility Identifier
let glassButton = app.buttons["glass-button"].firstMatch let sensorButton = app.buttons["sensor-button"].firstMatch // glassButton.tap() sensorButton.tap()
// // let tap3Button = app.buttons["tap3_button"].firstMatch expectation(for: NSPredicate(format: "exists ==
true"), evaluatedWith: tap3Button, handler: nil) waitForExpectations(timeout: 30, handler: nil) // 10 for _ in 1...10 { tap3Button.tap() }
None
UI UI // let screenshot = XCUIScreen.main.screenshot() // let attachment
= XCTAttachment(screenshot: screenshot) attachment.lifetime = .keepAlways add(attachment)
Report Navigator
(1)
None
fastlane snapshot fastlane iOS/Android snapshot https://github.com/fastlane/fastlane
( ) 1. UI 2. UI Accessibility Identifier 3. UI
4. fastlane snapshot 5. UI Snapshot 6. fastlane snapshot
fastlane snapshot RubyGems fastlane Xcode snapshot Snapfile, SnapshotHelper.swift $ sudo
gem install fastlane --verbose $ fastlane snapshot init Snapfile # devices(["iPhone 8","iPhone 8 Plus","iPhone X","iPhone SE"]) # languages(["ja-jP"])
snapshot SnapshotHelper.swift UI let app = XCUIApplication() // snapshot setupSnapshot(app)
// ) snapshot("01_Connection ")
(2)
None
UI UI app.launchArguments.append("SCREENSHOT") ProcessInfo ProcessInfo.processInfo.arguments.contains("SCREENSHOT") UI
UI ( )
UIViewController view Accessibility Identifier otherElements view // .otherElements view let
view = app.otherElements["connection-view"].firstMatch // view expectation(for: NSPredicate(format: "exists == true"), evaluatedWith: element, handler: nil) waitForExpectations(timeout: 30, handler: nil)
$ fastlane snapshot ( + snapshot )
fastlane frameit (iPhone Plus) ( X )