$30 off During Our Annual Pro Sale. View Details »
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
1.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
1.7k
Liquid Glass を Metal Shader で描きたいだけの人生だった…
temoki
0
76
Skip Skip Run Run Run ♫
temoki
0
750
さようならRxSwift こんにちは*****
temoki
1
450
Androidで不安定なPlatform Viewsとの闘い
temoki
0
1k
iOSパッケージマネージャー奮闘記 完結編
temoki
2
640
事業譲渡を受けたアプリとの統合で失敗、 そしてユーザーからの評価回復に至るまで
temoki
1
680
Apple Vision Proデベロッパラボに参加してきた
temoki
0
520
年末年始の成果、そして現状の紹介
temoki
0
240
Other Decks in Technology
See All in Technology
AI駆動開発の実践とその未来
eltociear
1
280
障害対応訓練、その前に
coconala_engineer
0
120
ペアーズにおけるAIエージェント 基盤とText to SQLツールの紹介
hisamouna
0
430
SQLだけでマイグレーションしたい!
makki_d
0
1.1k
re:Invent2025 コンテナ系アップデート振り返り(+CloudWatchログのアップデート紹介)
masukawa
0
390
AlmaLinux + KVM + Cockpit で始めるお手軽仮想化基盤 ~ 開発環境などでの利用を想定して ~
koedoyoshida
0
120
ActiveJobUpdates
igaiga
1
140
Amazon Bedrock Knowledge Bases × メタデータ活用で実現する検証可能な RAG 設計
tomoaki25
4
740
ExpoのインダストリーブースでみたAWSが見せる製造業の未来
hamadakoji
0
150
AWS Security Agentの紹介/introducing-aws-security-agent
tomoki10
0
320
寫了幾年 Code,然後呢?軟體工程師必須重新認識的 DevOps
cheng_wei_chen
1
1.5k
Power of Kiro : あなたの㌔はパワステ搭載ですか?
r3_yamauchi
PRO
0
180
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
22
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
240
Google's AI Overviews - The New Search
badams
0
860
Facilitating Awesome Meetings
lara
57
6.7k
Agile that works and the tools we love
rasmusluckow
331
21k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Writing Fast Ruby
sferik
630
62k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
21
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 )