Science & Technology

Challenge: Create Great Documents-Discover

Explore the new documentation features of Xcode and learn how to add documentation to your own frameworks and packages, or your favorite open source projects. We ask you to document your own framework or package (or your favorite open source project) for this task. Use Xcode 13 to create a document from header comments in the Swift framework and add a document catalog to organize your content.

Start the challenge

Open your project in Xcode and use the Swift DocC markdown syntax to start adding doc comments to your source. DocC uses the comments written in the source code as the content of the generated document page. At a minimum, add basic document comments to the framework’s public symbols for use by DocC as a single-sentence summary or summary. Here is an example:

public struct Sloth {
    public var species: Species

Once the document is complete[製品]>[ドキュメントのビルド]Select with quick help[開発者ドキュメント]Generates the source document for the window.

Xcode document window displaying information about sloths

Need help creating or creating a document? Visit the Digital Lounge for Developer Tools. From 1 pm to 5 pm (Pacific Daylight Time) Thursday, stop by the Developer Tools Study Hall on the # devtools-study-hall channel to share progress, ask questions about your project, and collaborate with others. I will. You can also share your progress on the developer forums using the tag “WWDC21-Challenges” or on social media using the hashtag # WWDC21Challenges.


Documenting the Swift framework or package

Read the WWDC21 Challenge Terms of Service

Challenge: Create Great Documents-Discover Challenge: Create Great Documents-Discover

Back to top button