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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
aoi
September 28, 2022
Technology
670
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
85
即時通知を導入する際に考えるべきこと
aomathwift
0
6.1k
機能ごとに動作するミニアプリでプレビューサイクルを爆速にした話 After Talk
aomathwift
0
550
機能ごとに動作するミニアプリでプレビューサイクルを爆速にした話
aomathwift
1
11k
Other Decks in Technology
See All in Technology
「軸足」は 固定しなくていい - 熱量と強みで描く、しなやかなキャリアの形
kakehashi
PRO
1
260
Deep Data Security 機能解説
oracle4engineer
PRO
2
110
千葉での単身赴任からAWSをやり続け、千葉に戻ってきた話
yama3133
1
120
「勝手に広まる」人気 AI エージェントを爆速で作ろう!(AWS Summit Japan 2026講演資料)
minorun365
PRO
10
2.5k
MUSUBI 田中裕一『AIと共に行う「しごとのリデザイン」- スモールバックオフィス編』AI Ops Lab #4
musubi
0
310
技術・能力を向上する原理原則 #きのこセッションa #きのこ2026
bash0c7
0
120
iOS アプリの「これって不具合ですか?」を AI に調べてもらう
miichan
0
140
AI 不只幫你寫 Code: 當專案從 300 暴增到 1500, 我們如何撐住 DevOps
appleboy
0
220
AIが自律的に回る開発ループを設計してチーム開発に組み込む
nekorush14
0
120
ロボティクスの技術 / Robotics Technology
ks91
PRO
0
130
現場のトークンマネジメント
dak2
1
190
GitHub Copilot 最新アップデート – 「一歩先」の実践活用術
moulongzhang
5
1.6k
Featured
See All Featured
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
620
Navigating Weather and Climate Data
rabernat
0
230
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
170
The agentic SEO stack - context over prompts
schlessera
0
820
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
160
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
580
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.5k
The Invisible Side of Design
smashingmag
301
52k
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 ׆༻ͷՄೳੑ͕͍ͬͯΔ🚀