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
920
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
Skip Skip Run Run Run ♫
temoki
0
380
さようならRxSwift こんにちは*****
temoki
1
250
Androidで不安定なPlatform Viewsとの闘い
temoki
0
650
iOSパッケージマネージャー奮闘記 完結編
temoki
2
430
事業譲渡を受けたアプリとの統合で失敗、 そしてユーザーからの評価回復に至るまで
temoki
1
520
Apple Vision Proデベロッパラボに参加してきた
temoki
0
370
年末年始の成果、そして現状の紹介
temoki
0
130
Apple HIGのススメ
temoki
0
230
ChatGPTにSVGでお絵描きさせる
temoki
0
520
Other Decks in Technology
See All in Technology
PL900試験から学ぶ Power Platform 基礎知識講座
kumikeyy
0
110
君も受託系GISエンジニアにならないか
sudataka
2
370
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
57k
個人開発から公式機能へ: PlaywrightとRailsをつなげた3年の軌跡
yusukeiwaki
11
2.7k
Datadog APM におけるトレース収集の流れ及び Retention Filters のはなし / datadog-apm-trace-retention-filters
k6s4i53rx
0
320
データ基盤の成長を加速させる:アイスタイルにおける挑戦と教訓
tsuda7
3
650
アジャイル開発とスクラム
araihara
0
160
Bounded Context: Problem or Solution?
ewolff
1
210
SA Night #2 FinatextのSA思想/SA Night #2 Finatext session
satoshiimai
1
100
スクラムのイテレーションを導入してチームの雰囲気がより良くなった話
eccyun
0
110
滅・サービスクラス🔥 / Destruction Service Class
sinsoku
6
1.5k
依存関係があるコンポーネントは Barrel ファイルでまとめよう
azukiazusa1
3
530
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
How to train your dragon (web standard)
notwaldorf
90
5.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
310
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
400
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Making Projects Easy
brettharned
116
6k
Building Adaptive Systems
keathley
40
2.4k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
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 )