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
250
0
Share
Swift_Argument_Parser_iPlayground_2020.pdf
Dani Shuo
November 08, 2020
Other Decks in Technology
See All in Technology
暗黙知について一歩踏み込んで考える - 暗黙知の4タイプと暗黙考・暗黙動へ
masayamoriofficial
0
550
サイバーフィジカル社会とは何か / What Is a Cyber-Physical Society?
ks91
PRO
0
160
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
4
14k
ふりかえりがなかった職能横断チームにふりかえりを導入してみて学んだこと 〜チームのふりかえりを「みんなで未来を考える場」にするプロローグ設計〜
masahiro1214shimokawa
0
250
Hello UUID
mimifuwacc
0
120
ASTのGitHub CopilotとCopilot CLIの現在地をお話しします/How AST Operates GitHub Copilot and Copilot CLI
aeonpeople
1
200
3つのボトルネックを解消し、リリースエンジニアリングを再定義した話
nealle
0
270
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
Data Enabling Team立ち上げました
sansantech
PRO
0
290
バックオフィスPJのPjMをコーポレートITが担うとうまくいく3つの理由
yueda256
1
290
プロダクトを育てるように生成AIによる開発プロセスを育てよう
kakehashi
PRO
1
880
機能・非機能の学びを一つに!Agent Skillsで月間レポート作成始めてみた / Unifying Bug & Infra Insights — Building Monthly Quality Reports with Agent Skills
bun913
5
3.8k
Featured
See All Featured
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
500
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
Practical Orchestrator
shlominoach
191
11k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
250
Building an army of robots
kneath
306
46k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
510
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