Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Swift_Argument_Parser_iPlayground_2020.pdf

Dani Shuo
November 08, 2020

 Swift_Argument_Parser_iPlayground_2020.pdf

Dani Shuo

November 08, 2020
Tweet

Other Decks in Technology

Transcript

  1. Wang Shuo Yen 王碩彥 40% iOS / 10% Flutter ☕

    40% Medium: https://medium.com/@yusatrtru Github: https://github.com/danishuotw
  2. Agenda •What’s Swift Argument Parser? •How to use it? •

    Property wrapper • Customizing help • Validation • Subcommands •Demo
  3. How to make commands like git? •git add . •git

    push <remote> - tags •git remote prune origin
  4. How to get Unix executable file •-> swift build -c

    release •-> cd .build •-> cd release •-> find <project> exec file
  5. Appendix: Reference • GitHub: Swift Argument Parser • swift.org: Announcing

    ArgumentParser • The Ultimate Guide To Swift Executables • Writing Command Line Tools in Swift Using ArgumentParser