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
70
ローカルのグローバル環境を可能な限り汚染しないXcodeの開発環境構築
グローバル環境を可能な限り汚染しないXcodeの開発環境構築
Yu Sugawara
October 27, 2021
Tweet
Share
More Decks by Yu Sugawara
See All by Yu Sugawara
HIG の歴史
yusuga
1
37
誰でも簡単に組版した PDF を生成する仕組みづくり
yusuga
1
73
WWDC 2023 現地参加報告(コード編)
yusuga
0
140
マイク環境を考える
yusuga
0
35
Custom AppをIP制限ありのままで審査に通す方法
yusuga
0
5.6k
Swiftのas Any / AnyObjectの暗黙的な型変換について
yusuga
2
1.6k
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
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
930
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
200
useSyncExternalStoreを使いまくる
ssssota
6
1k
Symfony Mapper Component
soyuka
2
730
Go の GC の不得意な部分を克服したい
taiyow
2
770
ソフトウェアの振る舞いに着目し 複雑な要件の開発に立ち向かう
rickyban
0
890
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
2
170
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
103 Early Hints
sugi_0000
1
230
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
440
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Making Projects Easy
brettharned
116
5.9k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Why Our Code Smells
bkeepers
PRO
335
57k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Six Lessons from altMBA
skipperchong
27
3.5k
Agile that works and the tools we love
rasmusluckow
328
21k
Scaling GitHub
holman
458
140k
A designer walks into a library…
pauljervisheath
204
24k
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