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
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
91
即時通知を導入する際に考えるべきこと
aomathwift
0
6.2k
機能ごとに動作するミニアプリでプレビューサイクルを爆速にした話 After Talk
aomathwift
0
560
機能ごとに動作するミニアプリでプレビューサイクルを爆速にした話
aomathwift
1
12k
Other Decks in Technology
See All in Technology
名古屋の市バスGTFS-JPデータ×スガキヤ 最寄りバス停検索をAmazon ElastiCache Serverless for Valkeyで最適化する
usanchuu
1
500
システム思考で問題に対処する
yussak
0
210
ガバメントクラウドでのランサムウェア対策
techniczna
2
1k
【CEDEC2026】『GRANBLUE FANTASY: Relink - Endless Ragnarok』のバトル制作事例 ~最高のキャラゲーを目指して~
cygames
PRO
0
230
20260807_第6回_関東kaggler会LT_claw系bot xangiと始める、"寂しくない" kaggle
sugupoko
0
210
【CEDEC2026】ゲームシナリオライターを支援するAIツール開発の実践 ― 設計とプロンプトの工夫 ―
cygames
PRO
1
770
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.9k
AI ネイティブな組織に Gemini Enterprise Agent Platform がなぜ必要なのか
asei
1
190
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
17
6.8k
ガバメント AI 源内を地方自治体は活用できるのか可能性と課題、期待について
takeda_h
1
370
老害フォレンジッカーはAI羊の夢を見るか?
tadmaddad
0
310
【CEDEC2026】『ウマ娘 プリティーダービー』 英語版のキャラクターの方言や口調をローカライズするための創造的アプローチ
cygames
PRO
1
200
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
Visualization
eitanlees
152
17k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
440
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
640
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.2k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
460
Designing for Performance
lara
611
70k
Git: the NoSQL Database
bkeepers
PRO
432
67k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Unsuck your backbone
ammeep
672
58k
We Are The Robots
honzajavorek
0
290
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 ׆༻ͷՄೳੑ͕͍ͬͯΔ🚀