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
210
Swift_Argument_Parser_iPlayground_2020.pdf
Dani Shuo
November 08, 2020
Tweet
Share
Other Decks in Technology
See All in Technology
いいたいことちゃんという
tkengo
0
110
GraphQL 成熟度モデルの紹介と、プロダクトに当てはめた事例 / GraphQL maturity model
mh4gf
7
1.4k
プロンプトエンジニアリングでがんばらない-Agentic Workflow へ-近藤憲児
kenjikondobai
4
1k
エンジニアのキャリアをちょっと楽しくする3本の軸/Three Pillars to Make an Engineer's Career More Enjoyable
kwappa
0
2.8k
EMとして2023年度に頑張ったこと / What we did well in FY2023 as a EM
pauli
1
170
【NW X Security JAWS#3】L3-4:AWS環境のIPv6移行に向けて知っておきたいこと
shotashiratori
0
440
開発パフォーマンスを最大化するための開発体制
ham0215
2
460
KubeConにproposalを送りたい人へのアドバイス
sat
PRO
3
260
JSON攻略法.pdf
miyakemito
8
5.1k
本当のAWS基礎
toru_kubota
0
540
プラットフォームってつくることより計測することが重要なんじゃないかという話 / Platform Engineering Meetup #8
taishin
1
370
MapLibreとAmazon Location Service
dayjournal
1
160
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
17
1.4k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
How to train your dragon (web standard)
notwaldorf
73
5.2k
RailsConf 2023
tenderlove
4
540
Raft: Consensus for Rubyists
vanstee
132
6.3k
The Illustrated Children's Guide to Kubernetes
chrisshort
31
46k
Why Our Code Smells
bkeepers
PRO
331
56k
Atom: Resistance is Futile
akmur
259
25k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
227
16k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
7
1k
GraphQLの誤解/rethinking-graphql
sonatard
50
9.2k
Docker and Python
trallard
34
2.7k
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