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
36
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
From Translations to Multi Dimension Entities
alexanderschranz
2
130
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
280
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
たのしいparse.y
ydah
3
120
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
550
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
190
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
130
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
7
1.3k
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
450
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
testcontainers のススメ
sgash708
1
120
Featured
See All Featured
The Language of Interfaces
destraynor
154
24k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Designing Experiences People Love
moore
138
23k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
Code Review Best Practice
trishagee
65
17k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
4 Signs Your Business is Dying
shpigford
181
21k
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