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
Embedded FrameworkからSPMへ 段階的移行の軌跡
Search
ras0q
July 20, 2023
Programming
0
350
Embedded FrameworkからSPMへ 段階的移行の軌跡
2023/07/20のpixiv App Nightでの発表スライドです。
https://pixiv.connpass.com/event/288082/
ras0q
July 20, 2023
Tweet
Share
More Decks by ras0q
See All by ras0q
PencilKitで実装するPDFへの手書き注釈 / Handwritten-annotations to PDF with PencilKit
ras0q
0
530
iOS16で変わった画面の向きを操作する方法 - iOSDC Japan 2023
ras0q
0
2.5k
Other Decks in Programming
See All in Programming
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
440
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
Zoneless Testing
rainerhahnekamp
0
120
CSC509 Lecture 14
javiergs
PRO
0
140
第5回日本眼科AI学会総会_AIコンテスト_3位解法
neilsaw
0
170
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
930
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
1
370
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
900
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
Featured
See All Featured
Making Projects Easy
brettharned
116
5.9k
Building Adaptive Systems
keathley
38
2.3k
Statistics for Hackers
jakevdp
796
220k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Agile that works and the tools we love
rasmusluckow
328
21k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
Transcript
Ras Embedded Framework͔ΒSPM ஈ֊తҠߦͷي
ࣗݾհ • Ras (Β͢) • {Twitter, GitHub, Scrapbox}: @ras0q •
দ͔Β্ژͯ͠4Ͱ͢ • pixivࣄۀຊ෦/ΞϓϦΤϯδχΞϦϯάνʔϜ (ΞϧόΠτ) • Ҏલ·ͰSketchνʔϜʹ͍·ͨ͠ 👈 ࠓճ͜ͷͱ͖ͷ • ౦ژۀେֶ B4 / σδλϧ࡞ಉձtraP • ීஈGoͰόοΫΤϯυΛॻ͍͍ͯ·͢ • iOSDC 2023ग़·͢ʂʂʂʂʂʂʂʂʂʂʂʂʂ
Swift Package ManagerͰ ϓϩδΣΫτཧ͠·ͤΜ͔ʁ
ͷલʹSwift Package Manager ʹ͍ͭͯগ͚ͩ͠
Swift Package Manager (SPM) • Appleެࣜͷύοέʔδཧπʔϧ (2019~) • ͜Ε·ͰCocoaPodsCarthage͕ओྲྀ •
ϥΠϒϥϦϓϩμΫτΛSwiftϑΝΠϧͰཧͰ͖Δ • Package.swiftʹґଘؔΛهड़Ͱ͖Δ • Մಡੑͷ্ • ίϯϑϦΫτ͕ى͖ʹ͍͘ • XcodeprojͰͷύοέʔδཧසൟʹίϯϑϦΫτ͢Δ
None
SPMΛϓϩδΣΫτʹ͏ͱ… • ϓϩδΣΫτΛϞδϡʔϧʹ؆୯ʹׂͰ͖Δ • ϓϩδΣΫτͷmonorepoԽ • ґଘ͕ؔίʔυ্Ͱ໌֬ʹͳΔ • νʔϜ։ൃͰίϯϑϦΫτ͠ͳ͍ •
͜Ε·Ͱ֤ϞδϡʔϧʹxcodeprojΛஔ (Embedded Framework) • ࡞ɾཧ͕େม
ͱ͜ΖͰ
Swift Package ManagerͰ ϓϩδΣΫτཧ͠·ͤΜ͔ʁ
pixiv Sketch • ͓ֆ͔͖ίϛϡχέʔγϣϯΞϓϦ • ʮʑͷ͓ֆ͔͖Λͬͱָ͘͠ʯ • ΞϓϦ্Ͱֆ͕͔͚Δ • ίϝϯτػೳɺϥΠϒ৴ػೳͱ͔͋Δ
• ຖ͓͕ߋ৽͞ΕΔ
SketchͷϞδϡʔϧཧ • Embedded FrameworkͰ֤ϞδϡʔϧΛཧ • ৽نϞδϡʔϧͷ࡞͕େม • ίϯϑϦΫτ͕සൃ • SPMΛͬͯϞμϯͰվमʹڧ͍ϞδϡʔϧཧʹΓସ͍͑ͨ
• ҠߦͰ͖Δ෦Λஈ֊తʹҠߦͨ͠
None
SketchͰͷSPMҠߦखॱ 1. Ҡߦ͕ͦ͠͏ͳϞδϡʔϧͷચ͍ग़͠ 2. ҠߦͰ͖ͦ͏ͳϞδϡʔϧͷҠߦखॱΛܾΊΔ 3. ϞδϡʔϧΛ·ͱΊΔύοέʔδΛ࡞ 4. ҠߦखॱʹԊͬͯ1ͭͣͭҠߦΛߦ͏
SketchͰͷSPMҠߦखॱ 1. Ҡߦ͕ͦ͠͏ͳϞδϡʔϧͷચ͍ग़͠ 2. ҠߦͰ͖ͦ͏ͳϞδϡʔϧͷҠߦखॱΛܾΊΔ 3. ϞδϡʔϧΛ·ͱΊΔύοέʔδΛ࡞ 4. ҠߦखॱʹԊͬͯ1ͭͣͭҠߦΛߦ͏
1. Ҡߦ͕ͦ͠͏ͳϞδϡʔϧͷચ͍ग़͠ • ґଘ͍ͯ͠ΔϥΠϒϥϦ͕SPMʹରԠ͍ͯ͠ͳ͍ • UIपΓҰ୴์ஔ • storyboardxibϑΝΠϧͷҠߦ͕͍͠ • ແཧ͗ͣ͢͠
• Ҡߦ͕͍͠ͱ͜ΖͱΓ͋͑ͣͦͷ··Ͱ
SketchͰͷSPMҠߦखॱ 1. Ҡߦ͕ͦ͠͏ͳϞδϡʔϧͷચ͍ग़͠ 2. ҠߦͰ͖ͦ͏ͳϞδϡʔϧͷҠߦखॱΛܾΊΔ 3. ϞδϡʔϧΛ·ͱΊΔύοέʔδΛ࡞ 4. ҠߦखॱʹԊͬͯ1ͭͣͭҠߦΛߦ͏
2. ҠߦͰ͖ͦ͏ͳϞδϡʔϧͷҠߦखॱΛܾΊΔ • ·ͣଞͷґଘ͕ͳ͍SketchModelΛҠߦ • ͦͷ࣍ʹUI৴ͷґଘ͕গͳ͍SketchCommonSketchAPIΛҠߦ • UI৴पΓҰ୴์ஔ
SketchͰͷSPMҠߦखॱ 1. Ҡߦ͕ͦ͠͏ͳϞδϡʔϧͷચ͍ग़͠ 2. ҠߦͰ͖ͦ͏ͳϞδϡʔϧͷҠߦखॱΛܾΊΔ 3. ϞδϡʔϧΛ·ͱΊΔύοέʔδΛ࡞ 4. ҠߦखॱʹԊͬͯ1ͭͣͭҠߦΛߦ͏
3. ϞδϡʔϧΛ·ͱΊΔύοέʔδΛ࡞ • ϝχϡʔόʔ͔ΒύοέʔδΛ࡞ • ϓϩδΣΫτԼʹஔ • xcworkspaceʹՃ • SketchͰSketchPackageΛ࡞
SketchͰͷSPMҠߦखॱ 1. Ҡߦ͕ͦ͠͏ͳϞδϡʔϧͷચ͍ग़͠ 2. ҠߦͰ͖ͦ͏ͳϞδϡʔϧͷҠߦखॱΛܾΊΔ 3. ϞδϡʔϧΛ·ͱΊΔύοέʔδΛ࡞ 4. ҠߦखॱʹԊͬͯ1ͭͣͭҠߦΛߦ͏
4. ҠߦखॱʹԊͬͯ1ͭͣͭSPMҠߦΛߦ͏ ※ Ϟδϡʔϧ໊Moͱ͠·͢ • project_root/MoΛSketchPackage/MoʹҠಈ͢Δ • Mo.xcodeprojΛআ • ֤targetͷґଘϥΠϒϥϦ͔ΒMo.frameworkΛআ
& MoϞδϡʔϧΛՃ • assetϑΝΠϧͳͲೝࣝ͞Εͳ͍ͨΊҙ • reference error ى͖͕ͪ (࠶ىಈͰେମ࣏Γ·͢)
ҠߦखॱΛܾΊͯ ແཧͤͣSPMҠߦ͠Α͏
ࢀߟ • Swift.org - Package Manager • Swift Package centered
project - Build and Practice - Speaker Deck • iOSΞϓϦͰSPMΛ༻͍ͨϚϧνϞδϡʔϧߏΛࢼͯ͠Έͨ - Zenn
͓·͚ • SPMͷϞδϡʔϧׂΛͬͯݸਓΞϓϦΛ։ൃ͍ͯ͠·͢ • github.com/ras0q/traq-ios-clone • traQͷiOSΫϥΠΞϯτ • ࣌ظະఆͰ͢