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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Tomoki Kobayashi
August 20, 2018
Technology
1.1k
3
Share
Xcode & fastlane で iOS アプリのスクショ撮影を自動化しよう!
Nagoya iOS meetup Vol.4 での発表資料です。
https://nagoya-ios-meetup.connpass.com/event/95974/
Tomoki Kobayashi
August 20, 2018
More Decks by Tomoki Kobayashi
See All by Tomoki Kobayashi
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
2.7k
Liquid Glass を Metal Shader で描きたいだけの人生だった…
temoki
0
190
Skip Skip Run Run Run ♫
temoki
0
950
さようならRxSwift こんにちは*****
temoki
1
570
Androidで不安定なPlatform Viewsとの闘い
temoki
0
1.1k
iOSパッケージマネージャー奮闘記 完結編
temoki
2
730
事業譲渡を受けたアプリとの統合で失敗、 そしてユーザーからの評価回復に至るまで
temoki
1
780
Apple Vision Proデベロッパラボに参加してきた
temoki
0
590
年末年始の成果、そして現状の紹介
temoki
0
300
Other Decks in Technology
See All in Technology
(きっとたぶん)人材育成や教育のような何かの話
sejima
0
750
R&D 祭 2024 UE5で絵コンテ・作画の制作支援ツールをつくる話
olmdrd
PRO
0
160
Swift Sequence の便利 API 再発見
treastrain
1
290
「強制アップデート」か「チームの自律」か?エンタープライズが辿り着いたプラットフォームのハイブリッド運用/cloudnative-kaigi-hybrid-platform-operations
mhrtech
0
200
AWSアップデートから考える継続的な運用改善
toru_kubota
2
260
オライリーイベント登壇資料「鉄リサイクル・産廃業界におけるAI技術実応用のカタチ」
takarasawa_
0
410
【関西製造業祭り2026春】現場を変える技術はここまで来た〜世界最大の製造業見本市から持って帰ってきたもの〜
tanakaseiya
0
160
Agent Skillsで実現する記憶領域の運用とその後
yamadashy
2
1.9k
Vision Banana: Image Generators are Generalist Vision Learners
kzykmyzw
0
400
「背中を見て育て」からの卒業 〜専門技術としてのテスト設計を軸に、品質保証のバトンを繋ぐ〜 #genda_tech_talk
nihonbuson
PRO
3
1.4k
GCASアップデート(202603-202605)
techniczna
0
170
The Bag-of-Documents Model for Query Understanding and Retrieval
dtunkelang
0
130
Featured
See All Featured
The Limits of Empathy - UXLibs8
cassininazir
1
330
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
390
Fireside Chat
paigeccino
42
3.9k
sira's awesome portfolio website redesign presentation
elsirapls
0
240
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.6k
Facilitating Awesome Meetings
lara
57
6.8k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
The World Runs on Bad Software
bkeepers
PRO
72
12k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
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 )