{"id":128336,"date":"2021-06-10T13:00:57","date_gmt":"2021-06-10T13:00:57","guid":{"rendered":"https:\/\/developer.apple.com\/news\/?id=uyp21www"},"modified":"2021-06-10T13:00:57","modified_gmt":"2021-06-10T13:00:57","slug":"challenge-create-amazing-documentation","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2021\/06\/10\/challenge-create-amazing-documentation\/","title":{"rendered":"Challenge: Create amazing documentation"},"content":{"rendered":"<div class=\"inline-article-image\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2022\/09\/challenge-create-amazing-documentation.jpg\" data-hires=\"false\" alt=\"Swift packages icon of brown box with swift icon on it\"><\/div>\n<p>Explore Xcode&#8217;s new documentation features and learn how to add documentation to your own framework or package \u2014 or to your favorite open source project. For this challenge, we\u2019re asking you to create documentation for your own framework or package (or your favorite open source project). Use Xcode 13 to build documentation from the header comments in your Swift framework, and add a Documentation Catalog to organize your content.<\/p>\n<h3>Begin the challenge<\/h3>\n<p>Open up your project in Xcode, and start adding documentation comments in your source by using Swift DocC markdown syntax. DocC uses the comments you write in your source code as the content for the documentation pages it generates. At a minimum, add basic documentation comments to the framework\u2019s public symbols for DocC to use as their single-sentence abstracts or summaries. Here\u2019s an example:<\/p>\n<pre class=\"code-source\"><code> <span class=\"syntax-keyword\">public<\/span> <span class=\"syntax-keyword\">struct<\/span> <span class=\"syntax-title class_\">Sloth<\/span> { <span class=\"syntax-keyword\">public<\/span> <span class=\"syntax-keyword\">var<\/span> species: <span class=\"syntax-type\">Species<\/span><\/code><\/pre>\n<p>Once you\u2019ve finished your documentation, select Product &gt; Build Documentation to generate your source docs for Quick Help and the Developer Documentation window.<\/p>\n<div class=\"inline-article-image\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2022\/09\/challenge-create-amazing-documentation-1.jpg\" data-hires=\"false\" alt=\"Xcode documentation window displaying information about sloths\"><\/div>\n<p>Need help writing or constructing your documentation? You can share your progress on the Developer Forums.<\/p>\n<p><a href=\"https:\/\/developer.apple.com\/forums\/\" class=\"icon icon-after icon-chevronright\">Visit the Apple Developer Forums<\/a><\/p>\n<h3>Resources<\/h3>\n<p><a href=\"https:\/\/developer.apple.com\/wwdc21\/challenges\/terms\/WWDC21_Challenge_Terms_Conditions.pdf\" class=\"icon icon-after icon-chevronright\">Read the WWDC21 Challenges Terms and Conditions<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Explore Xcode&#8217;s new documentation features and learn how to add documentation to your own framework or package \u2014 or to your favorite open source project. For this challenge, we\u2019re asking you to create documentation for your own framework or package (or your favorite open source project). Use Xcode 13 to build documentation from the header [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":128337,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"class_list":["post-128336","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apple-developer-news"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/128336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=128336"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/128336\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media\/128337"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=128336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=128336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=128336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}