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
280
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
Function Body Macros で、SwiftUI の View に Accessibility Identifier を自動付与する/Function Body Macros: Autogenerate accessibility identifiers for SwiftUI Views
miichan
2
180
なぜSaaSがMCPサーバーをサービス提供するのか?
sansantech
PRO
8
2.8k
RSCの時代にReactとフレームワークの境界を探る
uhyo
10
3.4k
AIエージェント開発用SDKとローカルLLMをLINE Botと組み合わせてみた / LINEを使ったLT大会 #14
you
PRO
0
120
現場で効くClaude Code ─ 最新動向と企業導入
takaakikakei
1
240
2025年夏 コーディングエージェントを統べる者
nwiizo
0
160
品質視点から考える組織デザイン/Organizational Design from Quality
mii3king
0
200
会社紹介資料 / Sansan Company Profile
sansan33
PRO
6
380k
Firestore → Spanner 移行 を成功させた段階的移行プロセス
athug
1
470
ブロックテーマ時代における、テーマの CSS について考える Toro_Unit / 2025.09.13 @ Shinshu WordPress Meetup
torounit
0
120
Language Update: Java
skrb
2
300
人工衛星のファームウェアをRustで書く理由
koba789
15
7.8k
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
70
11k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Side Projects
sachag
455
43k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
We Have a Design System, Now What?
morganepeng
53
7.8k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
Documentation Writing (for coders)
carmenintech
74
5k
Producing Creativity
orderedlist
PRO
347
40k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
Practical Orchestrator
shlominoach
190
11k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
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 )