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
DocC Documentation Archiveをアプリ開発で活用してみよう / DocC...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
aoi
September 28, 2022
Technology
680
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DocC Documentation Archiveをアプリ開発で活用してみよう / DocC Documentation Archive for iOS Application
https://cookpad.connpass.com/event/254459/
aoi
September 28, 2022
More Decks by aoi
See All by aoi
モバイルアプリの行動ログの運用つらさ解消法 / mobile-log-troubleshooting
aomathwift
3
2.9k
ロック画面Widgetをサクッと実装してみた話
aomathwift
3
480
OS 固有の新機能をサービスに取り入れ活用していくための Tips
aomathwift
0
90
即時通知を導入する際に考えるべきこと
aomathwift
0
6.2k
機能ごとに動作するミニアプリでプレビューサイクルを爆速にした話 After Talk
aomathwift
0
560
機能ごとに動作するミニアプリでプレビューサイクルを爆速にした話
aomathwift
1
11k
Other Decks in Technology
See All in Technology
Alphaモジュール使っていいのかい!?いけないのかい!?どっちなんだいっ!?
watany
1
290
そのドキュメント、自動化しませんか?
yuksew
1
300
AIコード生成×サプライチェーン攻撃 — PHPが直面する“二重の信頼問題
shinyasaita
0
210
ソニー銀行におけるビジネスアジリティ向上のためのクラウドシフト戦略
srenext
0
830
世界、断片、モデル。そして理解
ardbeg1958
1
130
凡エンジニアがこの先生きのこるためには。〜TypeScript完全に理解したい〜
alchemy1115
2
310
AmplifyHostingConstructからSSRフレームワークのためのホスティング設計を考察する/amplify-hosting-construct
fossamagna
1
240
オブザーバビリティ、本当に活用できてる? 〜API連携×生成AIで成熟度を自動評価〜
dmmsre
1
3.6k
【Claude Code】鹿野さんに聞く 私の推しの並行開発環境 大公開 / claude-code-parallel-2026-07-15
tonkotsuboy_com
12
8.7k
Making sense of Google’s agentic dev tools
glaforge
1
280
ヘルスケア領域における AI 活用と その安全性担保のための取り組み (Leveraging AI in Healthcare and Our Efforts to Ensure Its Safety) - Google I/O Extended Tokyo 2026, July 11, 2026
zettaittenani
0
430
穢れた技術選定について
watany
17
5.6k
Featured
See All Featured
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
510
A Soul's Torment
seathinner
6
3.1k
The Limits of Empathy - UXLibs8
cassininazir
1
500
Being A Developer After 40
akosma
91
590k
Statistics for Hackers
jakevdp
799
230k
Facilitating Awesome Meetings
lara
57
7k
Optimising Largest Contentful Paint
csswizardry
37
3.8k
Building Adaptive Systems
keathley
44
3.1k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Navigating Team Friction
lara
192
16k
HDC tutorial
michielstock
2
750
Leo the Paperboy
mayatellez
8
1.9k
Transcript
DocC Documentation Archive Λ ΞϓϦ։ൃͰ׆༻ͯ͠ΈΑ͏ 2022/09/28 After Party iOSDC Japan
2022 @aomathwift
ࣗݾհ Aoi Okawa (@aomathwift) Cookpad Inc. iOS Developer Cookpad Mart
͓͜ͱΘΓ • ͜ΕΞϓϦͷυΩϡϝϯτΛ DocC ʹஔ͖͑ͨͱ͍͏ࣄྫͷͰ ͋Γ·ͤΜ • ΞϓϦέʔγϣϯλʔήοτͰ DocC Λॱʹѻ͏ํ๏ʹ͍ͭͯৄ
͘͠৮Ε·ͤΜ • ͋͘·ͰݕূͱΞΠσΞͷͱͯ͠ฉ͍͍ͯͩ͘͞
Swift-DocC ͰͷυΩϡϝϯτ࡞
Swift-DocC ͱ • Apple ७ਖ਼ͷυΩϡϝϯτ࡞πʔϧ • Xcode 13 Ҏ߱ʹ౷߹ •
OSS ͱͯ͠ެ։͞Ε͍ͯΔ
None
Swift-DocC ͷΞοϓσʔτ • Xcode 13.3 ͔ΒΞϓϦέʔγϣϯ͚ͷϏϧυΛαϙʔτ • Github Pages ʹ؆୯ʹϗεςΟϯάͰ͖Δػೳ
→ ΞϓϦυΩϡϝϯτͷ DocC ԽΛקΊΔػӡʁ
ΞϓϦʹඞཁͳυΩϡϝϯτ • ϓϩδΣΫτͷߏΞʔΩςΫνϟ • CI / CD ʹ͍ͭͯ • ։ൃϑϩʔ։ൃڥͷηοτΞοϓ
• Utility ΫϥεͷϝιουϓϩύςΟͷઆ໌
ΞϓϦʹඞཁͳυΩϡϝϯτ • ϓϩδΣΫτͷߏΞʔΩςΫνϟ • CI / CD ʹ͍ͭͯ • ։ൃϑϩʔ։ൃڥͷηοτΞοϓ
• Utility ΫϥεͷϝιουϓϩύςΟͷઆ໌ → Documentation Έ͍ͨͳσΟϨΫτϦԼʹஔ͍͍ͯΔ
ΞϓϦʹඞཁͳυΩϡϝϯτ • ϓϩδΣΫτͷߏΞʔΩςΫνϟ • CI / CD ʹ͍ͭͯ • ։ൃϑϩʔ։ൃڥͷηοτΞοϓ
• Utility ΫϥεͷϝιουϓϩύςΟͷઆ໌ → README.md CONTRIBUTING.md
None
ΞϓϦʹඞཁͳυΩϡϝϯτ • ϓϩδΣΫτͷߏΞʔΩςΫνϟ • CI / CD ʹ͍ͭͯ • ։ൃϑϩʔ։ൃڥͷηοτΞοϓ
• Utility ΫϥεͷϝιουϓϩύςΟͷઆ໌ → ίʔυίϝϯτ = DocC ͷه๏Λར༻
ΞϓϦʹඞཁͳυΩϡϝϯτ • ϓϩδΣΫτͷߏΞʔΩςΫνϟ • CI / CD ʹ͍ͭͯ • ։ൃϑϩʔ։ൃڥͷηοτΞοϓ
• Utility ΫϥεͷϝιουϓϩύςΟͷઆ໌ → Documentation Catalog Λ͏
Documentation Catalog •Markdownهࣄ֦ுϑΝΠϧΛ ؚΊΔ͜ͱͰಛఆͷAPIͷઆ໌Ҏ֎ ͷ෦ͷυΩϡϝϯτΛิ •ެࣜυΩϡϝϯτͷ Overview ͷ ϖʔδ͕֘
͜͏͢Δͱ DocC ԽͰ͖Δ • طଘͷ Markdown ϑΝΠϧΛ Documentation Catalog ʹೖΕࠐΉ
• ಛఆͷϝιουΫϥεͷઆ໌ DocC ίϝϯτΛॻ͖ࠐΉ
طଘͷυΩϡϝϯτͰݴ͏ͯࠔͬͯͳ͍ Ͱ DocC ͪΐͬͱ৮ͬͯΈ͍ͨͳ͊🥺
Documentation Archive ͱ͍͏ͷΛ༻͍ͯ ผͷܗͰ Swift-DocC Λ׆༻ͯ͠Έ·͠ΐ͏
Agenda • DocC Documentation Archive ͱ • Documentation Archive ͷߏ
• Documentation Archive ͷ׆༻
Documentation Archive ͍ͭͯ
Documentation Archive • *.doccarchive ֦ுࢠΛ࣋ͭυΩϡϝϯτͷຊମσΟϨΫτϦ • Xcode Ͱ։͘ͱ DocC υΩϡϝϯτͱͯ͠ϨϯμϦϯά͞ΕΔ
None
Documentation Archive ͷϏϧυ • Xcode ͷ GUI ͔Β࣮ߦ • Xcode
ଐͷ doccbuild ίϚϯυͰ࣮ߦ
None
Documentation Archive ͷϏϧυ(CLI) $ xcodebuild -workspace CookpadMart.xcworkspace -scheme "CookpadMart" -sdk
iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 13 Pro,OS=16.0' docbuild -derivedDataPath .build
Documentation Archive ͷߏ
None
*.doccarchive • υΩϡϝϯτΛϨϯμϦϯά͢Δͷʹඞཁͳใͷू·Γ • Xcode13 ·Ͱ͜ͷσΟϨΫτϦΛϏϧυࡁΈυΩϡϝϯτ͔Β Export Ͱ͖ͨ ※
Xcode14 ͔Β *.doccarchive/documentation ҎԼͷ HTML ϑΝΠ ϧୡ͔͠ Export Ͱ͖ͳ͍
*.doccarhive/data • ύʔε͞Εͨίϝϯτ͕ϝιουΫϥε͝ͱʹߏԽ͞Εͨͷ • υΩϡϝϯτͷݟͨͲ͓ΓͷใΛ json ͷܗͰͭ • {Target Name}.json
͕ϧʔτʹ͍Δ
{ "variants": [ ... ], "schemaVersion": { ... }, "sections":
[], "identifier": { ... }, "topicSections": [ ... ], "kind": "symbol", "metadata": { ... }, "hierarchy": { ... }, "references": { ... } }
{Target Name}.json • τοϓϖʔδใʹ͋ͨΔͷ • topicSections • Classes, Protocols, Structures,
Variables, … • references • ֤ΫϥεͷυΩϡϝϯτͷIDද໊ࣔ
None
"topicSections": [ { "title": "Classes", "identifiers": [ “doc:\/\/bunle-id\/documentation\/CookpadMartEC\/MartActivityLogger" ... ]
}, { "title": "Protocols", "identifiers": [ ... ] }, { "title": "Structures", "identifiers": [ ... ] }, { "title": "Variables", "identifiers": [ ... ] }, { "title": "Functions", "identifiers": [ ... }, { "title": "Operators", "identifiers": [ … ] }, { "title": "Type Aliases", "identifiers": [ ... ] }, { "title": "Enumerations", "identifiers": [ ... ] } ] { "variants": [ ... ], "schemaVersion": { ... }, "sections": [], "identifier": { ... }, "topicSections": [ ... ], "kind": "symbol", "metadata": { ... }, "hierarchy": { ... }, "references": { ... } }
"references": { "doc://bundle-id/documentation/CookpadMart/ActivityLogger": { "role": "symbol", "title": "ActivityLogger", "fragments": [
{ "kind": "keyword", "text": "protocol" }, { "kind": "text", "text": " " }, { "kind": "identifier", "text": "ActivityLogger" } ], "identifier": “doc:\/\/bundle-id\/documentation\/ CookpadMart\/ActivityLogger", "kind": "symbol", "type": "topic", "url": “\/documentation\/cookpadmartec\/activitylogger" }, ... } { "variants": [ ... ], "schemaVersion": { ... }, "sections": [], "identifier": { ... }, "topicSections": [ ... ], "kind": "symbol", "metadata": { ... }, "hierarchy": { ... }, "references": { ... } }
֤ class ͝ͱͷϑΝΠϧɾσΟϨΫτϦ • جຊతʹͦͷϖʔδͷυΩϡϝϯτʹฒΒΕΔηΫγϣϯͷใΛ ֤ηΫγϣϯ໊ͷΩʔʹͨͤΒΕ͍ͯΔ • σΟϨΫτϦҎԼϝιουɾม͝ͱʹಉ༷ͷηΫγϣϯσʔλΛ ͬͨ json
ϑΝΠϧ͕٧Ίࠐ·Ε͍ͯΔ
{ "primaryContentSections": [ ... ], "schemaVersion": { ... }, "sections":
[], "variants": [ ... ], "relationshipsSections": [ ... ], "identifier": { ... }, "topicSections": [ ... ], "kind": "symbol", "metadata": { ... }, "hierarchy": { ... }, "references": { ... } }
֤ class ͷϑΝΠϧ • topicSections • Initializers, Instance Properties, Instsnce
Methods… ͳͲ • primaryContentSections • declaration ͳͲ • relationshipsSections • inheritFrom, conformTo, conformingType
None
"primaryContentSections": [ { "kind": "declarations", "declarations": [ { "tokens": [
{ "kind": "keyword", "text": "protocol" }, { "kind": "text", "text": " " }, { "kind": "identifier", "text": "ActivityLogger" } ], "languages": [ "swift" ], "platforms": [ "iOS" ] } ] } ] { "primaryContentSections": [ ... ], "schemaVersion": { ... }, "sections": [], "variants": [ ... ], "relationshipsSections": [ ... ], "identifier": { ... }, "topicSections": [ ... ], "kind": "symbol", "metadata": { ... }, "hierarchy": { ... }, "references": { ... } }
None
"topicSections": [ { "title": "Structures", "identifiers": [ ... ] },
{ "title": "Initializers", "identifiers": [ ... ] }, { "title": "Instance Properties", "identifiers": [ ... ] }, { "title": "Instance Methods", "identifiers": [ ... ] }, { "title": "Type Aliases", "identifiers": [ ... ] }, { "title": "Type Properties", "identifiers": [ ... ] }, { "title": "Type Methods", "identifiers": [ ... ] }, { "title": "Default Implementations", "identifiers": [ ... ], "generated": true } ] { "primaryContentSections": [ ... ], "schemaVersion": { ... }, "sections": [], "variants": [ ... ], "relationshipsSections": [ ... ], "identifier": { ... }, "topicSections": [ ... ], "kind": "symbol", "metadata": { ... }, "hierarchy": { ... }, "references": { ... } }
None
"relationshipsSections": [ { "identifiers": [ "doc:\/\/bundle-id\/documentation\/CookpadMart\/ EmptyActivityLogger", "doc:\/\/bundle-id\/documentation\/CookpadMart\/ MartActivityLogger" ],
"kind": "relationships", "title": "Conforming Types", "type": "conformingTypes" } ] { "primaryContentSections": [ ... ], "schemaVersion": { ... }, "sections": [], "variants": [ ... ], "relationshipsSections": [ ... ], "identifier": { ... }, "topicSections": [ ... ], "kind": "symbol", "metadata": { ... }, "hierarchy": { ... }, "references": { ... } }
relationshipsSections • ґଘؔʹ͋ΔཁૉΛ ID ͰϦετΞοϓ • ͕ࣗܧঝ͍ͯ͠Δɾ͞Ε͍ͯΔ class • ͕ࣗ४ڌ͍ͯ͠Δɾ͞Ε͍ͯΔ
protocol • ผϞδϡʔϧͷͷඪ४ϥΠϒϥϦͷͷࢀরͰ͖Δ → 💡 ґଘؔͷՄࢹԽʹ͑ͦ͏
ґଘ͕ؔݟ͑ΔͱԿ͕خ͍͔͠ • ϦϑΝΫλϦϯάͷͱ͖ʹͲ͜ʹӨڹ͕ग़Δ͔ΛѲͰ͖Δ • ৽ϝϯόʔʹใڞ༗͢Δͱ͖ʹίʔυΛ͏ΑΓ؆୯
Documentation Archive ͷ׆༻ ґଘؔΛՄࢹԽͯ͠ΈΔ
ํ • ు͖ग़͞Εͨ *.doccarchive ʹରͯ͠ҎԼΛ࣮ߦ͢Δ • ֤ json ͷ relationshipsSections
ΩʔͷΛࢀর͢Δ • identi fi ers Ωʔͷ͔Βґଘؔʹ͋ΔཁૉΛऔಘ͢Δ • type ΩʔͷΛΈ্ͯهཁૉͱ֘ͷཁૉͱͷؔΛൈ͖ग़͢
࣮ • ҎԼͷ Ruby εΫϦϓτΛϓϩδΣΫτͰ࣮ߦ͍ͯ͠·͢ • https://github.com/aomathwift/dependencies_generator
ҰཡΛςΩετͷ··ग़ྗʢˢ Markdown Ͱগ͠ܗʣ
ಛఆͷཁૉʹର͢ΔґଘΛ PlantUML Ͱग़ྗ
࣮ࡍʹϓϩδΣΫτͰ׆༻͢Δʹ • ՌΛϦϙδτϦʹஔ͠ɺࣗಈςετͰఆظతʹߋ৽͞ΕΔঢ় ଶʹ͢Δ • ՌΛఆظతʹνʔϜͰோΊΔ࣌ؒΛ࡞Δ
ͦͷଞͷσʔλ׆༻ߏ • UIViewController Λܧঝ͍ͯ͠ΔΫϥεΛϦετΞοϓͯ͠ΞϓϦͷ ը໘ϦετΛ࡞Δ • conformingType ͷແ͍ protocol ͱ͔Λࣗಈݕͯ͠আΛקΊΔΞ
ϥʔτΛग़͢
·ͱΊ • Documentation Archive DocC υΩϡϝϯτΛ࡞Δͷʹඞཁͳཁૉ ͕٧Ίࠐ·Ε͍ͯͯใΛ༷ʑͳܗͰ׆༻Ͱ͖Δ • ΞϓϦͰͷ
Swift-DocC ׆༻ͷՄೳੑ͕͍ͬͯΔ🚀