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

Share Xcode Templates
 with team

Share Xcode Templates
 with team

テンプレートの作成と共有を簡単にしよう

https://github.com/ngtk/xcode-template

Kento Nagata

May 23, 2018
Tweet

More Decks by Kento Nagata

Other Decks in Technology

Transcript

  1. ©2018 Wantedly, Inc. Share Xcode Templates
 with team potatotips #51


    23.May.2018 - @ngtk, Kento Nagata ςϯϓϨʔτͷ࡞੒ͱڞ༗Λ؆୯ʹ͠Α͏
  2. ©2018 Wantedly, Inc. Ӭా݈ਓ 8BOUFEMZ *OD&OHJOFFS !OHULOU !OHUL • Wantedly

    VisitͷΞϓϦΛ։ൃ͍ͯ͠·͢ • Swift/iOS։ൃΛ͸͡Ίͯ5ϲ݄͘Β͍ • ͦͷલ͸Rails, React, Reduxͱ͔΢Σϒͷ։ൃΛ΍͍ͬͯͨਓ • Potatotips͸લճʹଓ͖2ճ໨ ☺
  3. ©2018 Wantedly, Inc. How to use Xcode template New File

    FIle > New > File…⌘N͔Β৽ن࡞੒͢Δͱ͖ʹબ΂ Δɻ
  4. ©2018 Wantedly, Inc. How to use Xcode template File Template

    Library XcodeͷӈԼʹ͋Δ΍ͭɺ͔͜͜Βυϥοάͯ͠ࠨ ΧϥϜͷσΟϨΫτϦ(Project Navigator)ʹυϩο ϓ͢Δͱ࡞੒Ͱ͖Δɻ
  5. ©2018 Wantedly, Inc. #!/bin/bash project_template_dir=$(cd $(dirname ${BASH_SOURCE:-$0})/../Templates; pwd) global_template_dir="$HOME/Library/Developer/Xcode/Templates" global_project_template_dir="$global_template_dir/visit-ios"

    function main() { prepare link_project_to_global echo "" echo "Installed✨ " echo "" show_instruction } function prepare() { if [ ! -e $global_template_dir ]; then mkdir -p $global_template_dir echo "+ Created template directory: $global_template_dir" fi } function link_project_to_global() { if [ -e "$global_project_template_dir" ]; then echo "Alread linked. $global_project_template_dir" echo "" show_instruction exit 1 fi ln -s $project_template_dir $global_project_template_dir echo "+ Linked to $global_project_template_dir" } function show_instruction() { echo "You can use it from \"File Template Library\"." echo "" echo " Xcode > View > Utilities > Show File Template Library" echo "" } main Install-template
  6. ©2018 Wantedly, Inc. 1. ςϯϓϨʔτΛ࢖ͬͯޮ཰Խ͠Α͏ • ͦͷલʹίʔυͰͰ͖Δڞ௨Խ͸΍Ζ͏ʂ 2. νʔϜͰڞ༗͠Α͏ 3.

    xcode-templateͰ؆୯ʹ࡞੒ɾڞ༗Ͱ͖ΔΑ • https://github.com/ngtk/xcode-template • ࠓ೔࡞ͬͯ·ͩࡶͳͱ͜Ζ͕ଟ͍ͷͰɺ͜ͷޙ΋͏ͪΐͬͱؤுΓ·͢ ·ͱΊ