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
ローカルのグローバル環境を可能な限り汚染しないXcodeの開発環境構築
Search
Yu Sugawara
October 27, 2021
Programming
0
65
ローカルのグローバル環境を可能な限り汚染しないXcodeの開発環境構築
グローバル環境を可能な限り汚染しないXcodeの開発環境構築
Yu Sugawara
October 27, 2021
Tweet
Share
More Decks by Yu Sugawara
See All by Yu Sugawara
HIG の歴史
yusuga
1
33
誰でも簡単に組版した PDF を生成する仕組みづくり
yusuga
1
72
WWDC 2023 現地参加報告(コード編)
yusuga
0
140
マイク環境を考える
yusuga
0
31
Custom AppをIP制限ありのままで審査に通す方法
yusuga
0
5.3k
Swiftのas Any / AnyObjectの暗黙的な型変換について
yusuga
2
1.5k
Pure DI 101
yusuga
0
210
Final conclusion of the iOS architecture
yusuga
0
270
Practical application of ReactorKit
yusuga
1
360
Other Decks in Programming
See All in Programming
CSC509 Lecture 08
javiergs
PRO
0
110
Amazon Neptuneで始めてみるグラフDB-OpenSearchによるグラフの全文検索-
satoshi256kbyte
4
330
offers_20241022_imakiire.pdf
imakurusu
2
360
推し活としてのrails new/oshikatsu_ha_iizo
sakahukamaki
3
1.7k
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
9
1k
Honoの来た道とこれから
yusukebe
19
3k
レガシーな Android アプリのリアーキテクチャ戦略
oidy
1
170
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
250
qmuntal/stateless のススメ
sgash708
0
120
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
150
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
430
Identifying User Idenity
moro
6
7.9k
Featured
See All Featured
Embracing the Ebb and Flow
colly
84
4.4k
Automating Front-end Workflow
addyosmani
1365
200k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
Making the Leap to Tech Lead
cromwellryan
132
8.9k
A Modern Web Designer's Workflow
chriscoyier
692
190k
4 Signs Your Business is Dying
shpigford
180
21k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
A Philosophy of Restraint
colly
203
16k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Fireside Chat
paigeccino
32
3k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
Transcript
ϩʔΧϧڥΛՄೳͳݶΓԚછ͠ͳ͍ Xcodeͷ։ൃڥߏங TechLab LTձ #̍ 2021-03-31 1
ੁݪ ༞ @yusuga_ 2
ڥߏஙͬͯͲ͏ͯ͠·͢ʁ 3
ڥߏஙͬͯͲ͏ͯ͠·͢ʁ • Carthage 3
ڥߏஙͬͯͲ͏ͯ͠·͢ʁ • Carthage • CocoaPods 3
ڥߏஙͬͯͲ͏ͯ͠·͢ʁ • Carthage • CocoaPods • xcodegen 3
ڥߏஙͬͯͲ͏ͯ͠·͢ʁ • Carthage • CocoaPods • xcodegen • swiftgen 3
ڥߏஙͬͯͲ͏ͯ͠·͢ʁ • Carthage • CocoaPods • xcodegen • swiftgen •
swiftlint 3
νʔϜ։ൃͰͷࠔΓ͝ͱ 4
ݪҼ 5
ݪҼ • ֤ʑͷڥʹΠϯετʔϧͯ͋͠Δπʔϧʹόʔδϣϯͷࠩҟ ͕͋Δ 5
ݪҼ • ֤ʑͷڥʹΠϯετʔϧͯ͋͠Δπʔϧʹόʔδϣϯͷࠩҟ ͕͋Δ • READMEʹʑͱڥߏஙखॱΛॻ͘ͷπϥΠ 5
ݪҼ • ֤ʑͷڥʹΠϯετʔϧͯ͋͠Δπʔϧʹόʔδϣϯͷࠩҟ ͕͋Δ • READMEʹʑͱڥߏஙखॱΛॻ͘ͷπϥΠ • ڥߏங͕Ͱ͖ͳ͍ͱ͍͏͍߹Θ͕ͤདྷΔͷπϥ͍ 5
ݪҼ • ֤ʑͷڥʹΠϯετʔϧͯ͋͠Δπʔϧʹόʔδϣϯͷࠩҟ ͕͋Δ • READMEʹʑͱڥߏஙखॱΛॻ͘ͷπϥΠ • ڥߏங͕Ͱ͖ͳ͍ͱ͍͏͍߹Θ͕ͤདྷΔͷπϥ͍ • lockϑΝΠϧͷࠩͳͲɺؾʹ͠ͳ͍ਓؾʹͤͣcommit͢Δ
ͷ͕πϥ͍ 5
ղܾํ๏ 6
ղܾํ๏ • ՄೳͳݶΓϩʔΧϧڥΛԚછ͠ͳ͍Ͱ֤छڥߏஙπʔϧΛ ༻͢Δ 6
ղܾํ๏ • ՄೳͳݶΓϩʔΧϧڥΛԚછ͠ͳ͍Ͱ֤छڥߏஙπʔϧΛ ༻͢Δ • makeϑΝΠϧΛλεΫϥϯφʔͱͯ͠༻͠ɺڥߏஙΛߦ͏ 6
ඪ Homebrew └─ Mint ├─ Carthage ├─ xcodegen ├─ swiftgen
└─ swiftlint bundler └─ CocoaPods 7
Homebrew • macOSͷύοέʔδϚωʔδϟ ❯ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ Homebrew/install/master/install.sh)"
8
Homebrew • Homebrewܦ༝ͰΠϯετʔϧ͍ͨ͠πʔϧΛهड़ͨ͠Brewfile Λ༻ҙ brew "mint" 9
Homebrew • BrewfileͷπʔϧΛΠϯετʔϧ ❯ brew bundle --no-upgrade --no-lock 10
Homebrew • πʔϧؒͷґଘؔ Homebrew └─ Mint 11
Mint • SwiftͷπʔϧͷύοέʔδϚωʔδϟ • mintܦ༝ͰΠϯετʔϧ͍ͨ͠πʔϧΛهड़ͨ͠MintfileΛ༻ҙ carthage/
[email protected]
yonaskolb/
[email protected]
swiftgen/
[email protected]
realm/
[email protected]
12
Mint • MintfileͷπʔϧΛΠϯετʔϧ ❯ mint bootstrap 13
Mint • πʔϧؒͷґଘؔ Homebrew └─ Mint ├─ Carthage ├─ xcodegen
├─ swiftgen └─ swiftlint 14
bundler • gemͷόʔδϣϯͱґଘؔཧπʔϧ1 ❯ gem install bundler 1 όʔδϣϯࢦఆͰͷΠϯετʔϧ: gem
install bundler:2.0.2 15
bundler • bundlerܦ༝ͰΠϯετʔϧ͍ͨ͠πʔϧΛهड़ͨ͠GemfileΛ ༻ҙ source 'https://rubygems.org' gem 'cocoapods' 16
bundler • GemfileͷπʔϧΛΠϯετʔϧ2 ❯ bundle install --path vendor/bundle 2 --path
ඇਪͳͷͰɺΑΓਖ਼͘͠Δ߹ .bundle/config Λ༻ҙ 17
bundler • πʔϧؒͷґଘؔ Homebrew └─ Mint ├─ Carthage ├─ xcodegen
├─ swiftgen └─ swiftlint bundler └─ CocoaPods 18
ڥߏஙํ๏ 19
ڥߏஙํ๏ • MakefileΛ༻ҙ 19
ڥߏஙํ๏ • MakefileΛ༻ҙ • γΣϧεΫϦϓτΛ༻ҙ͍ͯͨ͜͠ͱ͋ͬͨͷͰ͕͢ɺݸ ਓతʹλεΫϥϯφʔͱͯ͠ͳΒMakefileͷํ͕ॻ͖͢ ͍ 19
ڥߏஙํ๏ • MakefileΛ༻ҙ • γΣϧεΫϦϓτΛ༻ҙ͍ͯͨ͜͠ͱ͋ͬͨͷͰ͕͢ɺݸ ਓతʹλεΫϥϯφʔͱͯ͠ͳΒMakefileͷํ͕ॻ͖͢ ͍ • zshͳΒmakeίϚϯυͷิޮ͘ 19
Makefile setup-tools: brew bundle mint bootstrap bundle install QRίʔυ: github.com/yusuga/xcode-setup/App/Makefile
20
Makefile setup-carthage: mint run carthage bootstrap QRίʔυ: github.com/yusuga/xcode-setup/App/Makefile 21
Makefile setup-cocoapods: bundle exec pod install QRίʔυ: github.com/yusuga/xcode-setup/App/Makefile 22
ڥߏஙํ๏ ❯ make • ҎԼ͕࣮ߦ͞ΕΔ 1. brew bundle 2. mint
bootstrap 3. bundle install 4. mint run carthage bootstrap 5. mint run swiftgen 6. mint run xcodegen 7. bundle exec pod install 8. open App.xcworkspace QRίʔυ: github.com/yusuga/xcode-setup/App/Makefile 23
ڥߏஙํ๏ 24
ڥߏஙํ๏ • Swiftͷπʔϧ → Mintfile 24
ڥߏஙํ๏ • Swiftͷπʔϧ → Mintfile • gemͷπʔϧ → Gemfile 24
ڥߏஙํ๏ • Swiftͷπʔϧ → Mintfile • gemͷπʔϧ → Gemfile •
Carthage → Cartfile 24
ڥߏஙํ๏ • Swiftͷπʔϧ → Mintfile • gemͷπʔϧ → Gemfile •
Carthage → Cartfile • CocoaPods → Podfile 24
ࠓޙղܾ͍ͨ͠՝ 25
ࠓޙղܾ͍ͨ͠՝ • HomebrewɺMintɺbundlerϩʔΧϧڥ͔ΒΓ͍ͨ͠ 25
ࠓޙղܾ͍ͨ͠՝ • HomebrewɺMintɺbundlerϩʔΧϧڥ͔ΒΓ͍ͨ͠ • rbenv͋Δ͚Ͳπϥ͍ 25
ࠓޙղܾ͍ͨ͠՝ • HomebrewɺMintɺbundlerϩʔΧϧڥ͔ΒΓ͍ͨ͠ • rbenv͋Δ͚Ͳπϥ͍ • DockerͰղܾ͍ͨ͠ 25
ࠓޙղܾ͍ͨ͠՝ • HomebrewɺMintɺbundlerϩʔΧϧڥ͔ΒΓ͍ͨ͠ • rbenv͋Δ͚Ͳπϥ͍ • DockerͰղܾ͍ͨ͠ • ڥߏஙͷߴԽ 25
͝੩ௌ͋Γ͕ͱ͏ ͍͟͝·ͨ͠ʂ QRίʔυ: Zenn.dev ϩʔΧϧڥΛՄೳͳݶΓԚછ͠ͳ͍Xcodeͷ։ൃڥߏங 26