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
Swift_Argument_Parser_iPlayground_2020.pdf
Search
Dani Shuo
November 08, 2020
Technology
0
230
Swift_Argument_Parser_iPlayground_2020.pdf
Dani Shuo
November 08, 2020
Tweet
Share
Other Decks in Technology
See All in Technology
Long journey of Continuous Delivery at Mercari
hisaharu
1
200
Two-Tower モデルで実現する 検索リランキング / Shibuya_AI_2
visional_engineering_and_design
2
180
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
280
QAはソフトウェアエンジニアリングを学んで実践するのが大事なの
ymty
1
330
Test Smarter, Not Harder: Achieving Confidence in Complex Distributed Systems
eliasnogueira
1
150
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
7.2k
バクラクのモノレポにおける AI Coding のための環境整備と {Roo,Claude} Code活用事例 / AI Coding in Bakuraku's Monorepo: Environment Setup & Case Studies with {Roo, Claude} Code
upamune
9
5.7k
OpenTelemetry Collector internals
ymotongpoo
5
510
IAMのマニアックな話 2025を執筆して、 見えてきたAWSアカウント管理の現在
nrinetcom
PRO
3
400
Model Mondays S2E01: Advanced Reasoning
nitya
0
270
"SaaS is Dead" は本当か!? 生成AI時代の医療 Vertical SaaS のリアル
kakehashi
PRO
2
150
Autonomous Database サービス・アップデート (FY25)
oracle4engineer
PRO
2
750
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
50
8.3k
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
4 Signs Your Business is Dying
shpigford
183
22k
Unsuck your backbone
ammeep
671
58k
GraphQLとの向き合い方2022年版
quramy
46
14k
Speed Design
sergeychernyshev
30
990
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.5k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
The Language of Interfaces
destraynor
158
25k
Building Applications with DynamoDB
mza
95
6.4k
How STYLIGHT went responsive
nonsquared
100
5.6k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
Transcript
Let’s build Command-Line Tools: Swift Argument Parser iPlayground 2020 By
Wang Shuo Yen
Wang Shuo Yen 王碩彥 40% iOS / 10% Flutter ☕
40% Medium: https://medium.com/@yusatrtru Github: https://github.com/danishuotw
Agenda •What’s Swift Argument Parser? •How to use it? •
Property wrapper • Customizing help • Validation • Subcommands •Demo
What’s Swift Argument Parser •New framework package in Swift •Allow
you to create command line tools
None
None
Property Wrapper
Customizing option and flag names
Customizing Help
Validation
How to make commands like git? •git add . •git
push <remote> - tags •git remote prune origin
Subcommands
Enumeration
Making Asynchronous Tasks Behave Synchronously
Demo
Swift Package Commands •swift package init --type executable •swift package
generate-xcodeproj
How to get Unix executable file •-> swift build -c
release •-> cd .build •-> cd release •-> find <project> exec file
Appendix: Reference • GitHub: Swift Argument Parser • swift.org: Announcing
ArgumentParser • The Ultimate Guide To Swift Executables • Writing Command Line Tools in Swift Using ArgumentParser
Metrics: Pods vs Carthage vs SPM https://www.innominds.com/blog/a-new-approach-to-managing-dependencies-in-ios-development-with-sw ift-package-manager
Thank you Wang Shuo Yen 王碩彥 Medium: https://medium.com/@yusatrtru