惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
Engineering at Meta
Engineering at Meta
腾讯CDC
J
Java Code Geeks
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
Google Developers Blog
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
The Cloudflare Blog
aimingoo的专栏
aimingoo的专栏
T
The Blog of Author Tim Ferriss
D
Darknet – Hacking Tools, Hacker News & Cyber Security
WordPress大学
WordPress大学
博客园_首页
I
InfoQ
NISL@THU
NISL@THU
Recorded Future
Recorded Future
Security Latest
Security Latest
K
Kaspersky official blog
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
U
Unit 42
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
CERT Recently Published Vulnerability Notes
W
WeLiveSecurity
Webroot Blog
Webroot Blog
Last Week in AI
Last Week in AI
AWS News Blog
AWS News Blog
IT之家
IT之家
S
Schneier on Security
雷峰网
雷峰网
Know Your Adversary
Know Your Adversary
T
Threat Research - Cisco Blogs
C
CXSECURITY Database RSS Feed - CXSecurity.com
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
LangChain Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
月光博客
月光博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Stack Overflow Blog
Stack Overflow Blog
有赞技术团队
有赞技术团队
云风的 BLOG
云风的 BLOG
G
GRAHAM CLULEY
O
OpenAI News
The Last Watchdog
The Last Watchdog
TaoSecurity Blog
TaoSecurity Blog
The GitHub Blog
The GitHub Blog
V
Vulnerabilities – Threatpost

Inside Nutrient

A guide to the invisible work behind documents Introducing Nutrient Documents for Salesforce: Native document generation and signing Document AI vs. traditional OCR: Choosing between OCR, AI, and hybrid pipelines PDF SDK compliance and security evaluation checklist for enterprise teams (2026) Invariant Corp replaces paper processes with Nutrient Workflow and scales without limits What is process mapping? A complete guide Nutrient vs. Conga Composer for Salesforce document generation (2026) Document routing: How to automate document distribution The CTO’s AI playbook: Why accountability architecture beats orchestration Compliance workflow automation: Why built-in compliance is table stakes Workflow diagrams: Examples, symbols, and how to build one that actually runs Digital forms: Replace paper forms with automated workflows Approval workflow software: How to automate approvals Why document-centric automation is different The CEO’s AI playbook: Why decision architecture beats model selection Nutrient SDK product updates for Q1 2026 PDF redaction verification: How to prove sensitive data is permanently removed What is a VPAT? The complete guide to accessibility conformance reports What is PDF/UA? The accessible PDF standard explained Salesforce eSignatures: Generate, sign, and track documents in one flow Online document viewer: Options, tradeoffs, and how to embed one Document viewer for web apps: React, Vue, Angular (2026) Best document viewers in 2026: A buyer’s guide How to edit a PDF in Python: Add text, images, and annotations Nutrient advances Workflow platform with agentic AI for enterprise-grade speed and consistency in document-heavy operations How to create a Salesforce quote template from opportunity data The business case for accessibility: Five ways it drives enterprise value Python PDF library comparison (2026): 7 libraries for developers Why your AI agent hallucinates PDF table data PDF.js limitations: When to upgrade to a commercial PDF SDK How Subject scaled 5× with Nutrient’s PDF SDK without rebuilding its document layer I replaced our sales training with an AI coach that runs in Slack — here’s what broke Redirecting to: https://securitybuzz.com/cybersecurity-news/why-enterprise-permissions-are-ais-most-dangerous-inheritance/ Nutrient .NET SDK vs. iText Core: Complete comparison for .NET developers DocuVieware: Support’s most frequently asked setup questions Introducing Nutrient Workflow How to convert PDF to Word in C# (.NET) When email and spreadsheets stop working: Work order approval workflows for field teams on the move Compliance with confidence: Why document-centric automation is the foundation of your mission Nutrient expands AI Assistant, automating multistep document workflows inside any application What is document generation? A developer’s guide to PDF generation Document Converter data flow and how real-time watermarks skip the queue PDF/UA compliance guide: Requirements, standards, and best practices Computers still can’t understand you How Athena Intelligence built AI agents for regulated enterprises with Nutrient’s document infrastructure How to convert HTML to PDF (2026): 4 methods from browser print to SDK How to build a document extraction pipeline with Nutrient Vision API OCR vs. intelligent document processing: Choosing the right document extraction engine Beyond OCR: How document intelligence eliminates manual processing in regulated industries Nutrient vs. IronPDF: Complete comparison for .NET developers Nutrient vs. Aspose.PDF: Complete comparison for .NET developers Redirecting to: https://fortune.com/2026/02/19/openclaw-who-is-peter-steinberger-openai-sam-altman-anthropic-moltbook/ Lufthansa Systems uses Nutrient to deliver reliable, scalable PDF rendering for pilots worldwide Nutrient vs. Syncfusion: Complete comparison for .NET developers React’s useTransition: The hook you’re probably using wrong First City Monument Bank streamlines banking processes with Nutrient Workflow Redirecting to: https://www.sdcexec.com/warehousing/automation/article/22957364/nutrient-workflow-automation-the-missing-link-in-supply-chain-efficiency The complete guide to digital signatures: PAdES, CAdES, and XAdES explained Nutrient Python SDK: Production-grade document processing for Python Introducing agentic document editing for web applications with AI Assistant Nutrient vs. QuestPDF: Complete comparison for .NET developers How we fixed the GdPicture license expiration (and what to do if you’re affected) Red team security testing with agentic AI The future of healthcare document automation Best healthcare workflow software compared Nutrient SDK product updates for Q4 2025 How Harvey scaled legal document workflows 50 percent MoM without rebuilding infrastructure HIPAA-compliant document management in hospitals How we optimized rendering performance while handling thousands of annotations in React — Part 2 Automated PII removal with Nutrient API Redirecting to: https://www.devopsdigest.com/2026-low-code-no-code-predictions Redirecting to: https://www.kmworld.com/Articles/Editorial/ViewPoints/Leaders-predict-AI-to-continue-permeating-all-aspects-of-KM-in-2026-172594.aspx What are deep agents and how do they solve complex problems? Whipping up document magic: Your easy-bake recipe for Vue and Nutrient Web SDK 🧁 What I’ve learned about product iteration planning while building SDKs Passwordless document signing: Three-layer security guide New zip folder functionality streamlines file management in Document Automation Server The keyboard shortcuts playbook: Taking control of keyboard events in Nutrient Web SDK From experienced engineer to AI beginner: My unexpected journey AI-assisted manual testing: Handling Safari’s PDF rendering and UI quirks How to keep a 20-year-old SDK up to date How we optimized rendering performance while handling thousands of annotations in React — Part 1 Nutrient announces new executive hires to accelerate next phase of growth High performance UI using web workers Automate document conversion at scale with Python and Nutrient DCS From curiosity to PLG (and AI): My journey to understanding product-led growth Prost to progress: One year as Nutrient Pigeon usage at Nutrient: Bridging native SDKs to Flutter Modernizing CI build servers: How to migrate from Chef to Ansible Unix man pages: AI-friendly documentation since 1971 Consistent hashing for even load distribution Best AI redaction APIs: Complete comparison guide for 2025 Why AI document redaction matters for modern security From coding to coordinating: How AI transformed my workflow What is intelligent document processing (IDP)? A complete guide Enterprise PDF SDKs: Best PSPDFKit (now Nutrient) alternatives Nutrient SDK product updates for Q3 2025 GdPicture support best practices Redacting sensitive data with Nutrient AI redaction API How AI is transforming the customer experience at Nutrient: From instant answers to intelligent support
Creating interactive tutorials using DocC
Erhard Brand · 2024-12-12 · via Inside Nutrient

Good documentation is an absolute requirement when shipping a quality product. Developers need to be able to navigate your APIs easily, especially if you manage a complex iOS SDK with multiple platform targets, as we do at Nutrient. Some developers, myself included, learn new things by doing rather than reading. Enter DocC interactive tutorials.

We already have a blog post that covers our journey of generating DocC documentation for the multiple targets in Nutrient iOS SDK, which you can find here. An additional feature that’s available when using DocC is creating “code-along”-style interactive tutorials, similar to the ones created by Apple(opens in a new tab).

The first requirement is to have DocC set up in your framework or package, with your public interfaces documented using Xcode’s Markdown-based commenting syntax.

Having developers learn your framework and its use cases through an interactive code-along-style tutorial creates engagement and offer developers of different skill levels the ability to get to know your SDK.

In this blog post, you’ll create a basic interactive tutorial to help developers integrate Nutrient iOS SDK into a newly created iOS application.

Setting up the table of contents

In the project’s existing Documentation.docc folder, create a new folder called Tutorials(opens in a new tab), and define a table of contents for the new set of tutorials by creating the Nutrient.tutorial file. Inside the file, the Tutorials(opens in a new tab) directive defines the structure of the table of contents developers will use to access individual tutorial pages.

Tutorials(opens in a new tab) takes the name of the new tutorial as its parameter, typically matching the name of the framework or package being documented:

@Tutorials(name: "Nutrient")

This is followed by an introduction and image to display beneath it using the Intro(opens in a new tab) and Image(opens in a new tab) directives:

@Intro(title: "Building a basic PDF viewer using Nutrient iOS SDK") {

These tutorials will guide you through the process of integrating Nutrient iOS SDK into a newly created iOS app and customizing the UI and other SDK functionality.

@Image(source: "toc-ios-intro.png", alt: "Screenshot of an iOS device with the Nutrient viewer open.")

}

DocC will calculate the estimated time based on the completion time you specify for every individual tutorial. This will be covered in more depth further down.

table of contents

Next, define the different chapters of the tutorial using the Chapter(opens in a new tab) directive. Chapters can also include images and links to the individual tutorials using the TutorialReference(opens in a new tab) directive:

@Chapter(name: "Integrating the SDK and presenting a PDF document.") {

This guide will take you through the steps necessary to integrate Nutrient iOS SDK into a newly created application. By the end, you’ll be able to present a PDF document in the default Nutrient iOS SDK UI.

@Image(source: "toc-ios-intro.png", alt: "Screenshot of an iOS device with the Nutrient viewer open.")

@TutorialReference(tutorial: "doc:sdk-integration-ios")

@TutorialReference(tutorial: "doc:sdk-integration-vision-os")

@TutorialReference(tutorial: "doc:sdk-integration-mac-catalyst")

}

table of contents

If you have additional resources you want to share with your reader, use the optional Resources(opens in a new tab) directive:

@Resources {

Explore more resources from Nutrient.

@Videos(destination: "https://www.youtube.com/@pspdfkit5764/videos") {

Check out some of the other products Nutrient offers.

- [Nutrient Web SDK](https://www.youtube.com/watch?v=wsOxMY9cA4M)

}

@Downloads(destination: "https://www.nutrient.io/guides/ios/downloads/") {

Integrating manually? Download Nutrient iOS SDK here.

}

@Documentation(destination: "https://www.nutrient.io/guides/ios/") {

View our iOS SDK API documentation.

- [Nutrient iOS SDK API](https://www.nutrient.io/api/ios/documentation/overview)

}

}

table of contents

Your complete table of contents Nutrient.tutorial file will look like this:

@Tutorials(name: "Nutrient") {

@Intro(title: "Building a basic PDF viewer using Nutrient iOS SDK") {

These tutorials will guide you through the process of integrating Nutrient iOS SDK into a newly created iOS app and customizing the UI and other SDK functionality.

@Image(source: "toc-ios-intro.png", alt: "Screenshot of an iOS device with the Nutrient viewer open.")

}

@Chapter(name: "Integrating the SDK and presenting a PDF document.") {

This guide will take you through the steps necessary to integrate Nutrient iOS SDK into a newly created application. By the end, you’ll be able to present a PDF document in the default Nutrient iOS SDK UI.

@Image(source: "toc-ios-intro.png", alt: "Screenshot of an iOS device with the Nutrient viewer open.")

@TutorialReference(tutorial: "doc:sdk-integration-ios")

@TutorialReference(tutorial: "doc:sdk-integration-vision-os")

@TutorialReference(tutorial: "doc:sdk-integration-mac-catalyst")

}

@Chapter(name: "Customize the UI and other SDK functionality") {

This guide will show you how to customize the PDFViewController instance on iOS.

@Image(source: "ios-customize.png", alt: "Screenshot of an iOS device with the Nutrient viewer open.")

@TutorialReference(tutorial: "doc:sdk-customization-ios")

}

@Resources {

Explore more resources from Nutrient.

@Videos(destination: "https://www.youtube.com/@pspdfkit5764/videos") {

Check out some of the other products Nutrient offer.

- [Nutrient Web SDK](https://www.youtube.com/watch?v=wsOxMY9cA4M)

}

@Downloads(destination: "https://www.nutrient.io/guides/ios/downloads/") {

Integrating manually? Download Nutrient iOS SDK here.

}

@Documentation(destination: "https://www.nutrient.io/guides/ios/") {

View our iOS SDK API documentation.

- [Nutrient iOS SDK API](https://www.nutrient.io/api/ios/documentation/overview)

}

}

}

Creating tutorials

The next step is to create the individual tutorial pages the table of contents is linking to. First, create a new file called sdk-integration-ios.tutorial, and use the Tutorial(opens in a new tab) directive, optionally passing in the estimated time (in minutes) it would take to complete the tutorial. As mentioned above, the table of contents will automatically calculate the total completion time estimate for all the tutorials.

If you need to share resources with your reader, use the second parameter, called projectFiles, to point to a downloadable resource. The resource should be included in your Tutorials directory:

@Tutorial(time: 15, projectFiles: "quickstart-guide.pdf")

An Xcode version requirement can optionally be specified using the XcodeRequirement(opens in a new tab) directive:

@XcodeRequirement(title: "Xcode 15", destination: "https://developer.apple.com/download/")

Then, add an introduction to the tutorial using the Intro(opens in a new tab) directive. The introduction includes text and an image that will be used as the section’s background:

@Intro(title: "Getting Started on iOS") {

This guide will take you through the steps necessary to integrate Nutrient iOS SDK into a newly created iOS application. By the end, you’ll be able to present a PDF document in the default Nutrient iOS SDK UI.

> Tip: Nutrient iOS SDK can be evaluated without a trial license key, but with [certain limitations](/sdk/try/) (such as a red watermark added to documents). To evaluate without limitations, [get a trial key(/sdk/try/).

@Image(source: "toc-ios-intro.png", alt: "Screenshot of an iOS device with the Nutrient viewer open.")

}

table of contents

Following the introduction, add one or more Section(opens in a new tab) directives containing Steps(opens in a new tab) to organize the tutorial.

The first section will guide your reader through setting up their new Xcode project, and you can also choose to include an image next to the section title:

@Section(title: "Creating a New Xcode Project") {

@ContentAndMedia {

Xcode project setup and app creation.

@Image(source: "toc-ios-intro.png", alt: "Screenshot of an iOS device with the Nutrient viewer open.")

}

}

...

The Steps(opens in a new tab) directive contains the individual Step(opens in a new tab) directives. Step(opens in a new tab) directives are used to define a single task the reader should perform, using text to explain the step. Each Step directive also includes an image, video, or code snippet as context:

@Steps {

@Step {

Open Xcode and select File > New > Project... to create a new project for your application:

@Image(source: "create-new-project.png", alt: "The Xcode File menu is open with New > Project selected.")

}

@Step {

Choose the App template for your project:

@Image(source: "app-template.png", alt: "The Xcode New app menu is shown with the 'App' application type selected.")

}

@Step {

When prompted, enter your app name (PSPDFKit-Demo) and your organization identifier (com.example) and choose Storyboard for the interface:

@Image(source: "app-options.png", alt: "The Xcode application options screen is shown with some details prefilled.")

}

@Step {

Click Next and select the location to save the project.

}

@Step {

Click Create to finish.

}

}

Every step is shown with its corresponding asset to the right, which updates automatically as the reader scrolls.

table of contents

The second section covers the process of adding the Nutrient Swift package to the iOS project created in the previous step, using the same Section(opens in a new tab), Steps(opens in a new tab), and Step(opens in a new tab) directives:

@Section(title: "Adding the Nutrient Swift Package") {

@ContentAndMedia {

Adding the Nutrient dependency to your Xcode app.

@Image(source: "toc-ios-intro.png", alt: "Screenshot of an iOS device with the Nutrient viewer open.")

}

@Steps {

@Step {

Open your application in Xcode and select your project’s Package Dependencies tab.

@Image(source: "xcode-project-swift-packages.png", alt: "The Xcode Swift Dependencies tab is open with the 'add' button circled.")

}

@Step {

Copy the PSPDFKit Swift package repository URL into the search field:

> Note: https://github.com/PSPDFKit/PSPDFKit-SP

@Image(source: "add-package-url", alt: "The Xcode Swift Package Sources window is open with the PSPDFKit URL added to the Search field.")

}

@Step {

In the Dependency Rule fields, select Branch > master, and then click Add Package.

@Image(source: "swiftpm-branch-master", alt: "The Xcode Swift Package Sources window is open with the 'master' branch selected as the Dependency Rule.")

> Tip: Using Branch > master will ensure you always use the latest available version of Nutrient iOS SDK. Alternatively, you can select Version > Up to Next Minor to update at your own pace.

}

@Step {

After the package download completes, select Add Package.

@Image(source: "add-package-finish.png", alt: "The Xcode Swift Package Sources window is open with PSPDFKit selected to be added to the 'PSPDFKit-Demo' target.")

PSPDFKit should now be listed under Swift Package Dependencies in the Xcode Project navigator.

}

}

}

The final section includes some Swift code to show how to load a PDF document with Nutrient iOS SDK, using the same directives as the previous sections, but now including the Code(opens in a new tab) directive. DocC will generate a smooth transition between the Code(opens in a new tab) directives used for every step to show the changes occurring between every file as the reader scrolls through the steps.

The Code(opens in a new tab) directive requires the file name, as well as the location to the .swift file, as parameters. The .swift files should be included in your Tutorials(opens in a new tab) directory. To keep your tutorials organized, the source files don’t need to be placed in the root directory and can be placed inside subdirectories. Be sure to choose a naming convention for your .swift files that makes them easy for the reader to look up. An optional Image(opens in a new tab) can be included inside the Code(opens in a new tab) directive to show a preview of what the code would compile to:

@Section(title: "Displaying a PDF") {

@ContentAndMedia {

Displaying a PDF using Nutrient iOS SDK.

@Image(source: "toc-ios-intro.png", alt: "Screenshot of an iOS device with the Nutrient viewer open.")

}

@Steps {

@Step {

Optional: If you have a trial key or license key, add "import PSPDFKit" at the top of your AppDelegate file and set the key, like this:

@Code(name: "03-license-01.swift", file: 03-license-01.swift)

See our license key guide for more information.

}

@Step {

Add the PDF document you want to display to your application by dragging it into your project. On the dialog that’s displayed, select Finish to accept the default integration options. You can use this Quickstart Guide PDF as an example.

@Image(source: "drag-and-drop-document", alt: "Xcode is open with a PDF file being added to the PSPDFKit-Demo target.")

}

@Step {

Import PSPDFKit and PSPDFKitUI at the top of your UIViewController subclass implementation:

@Code(name: "03-import-02.swift", file: 03-import-02.swift)

}

@Step {

Load your PDF document and display the view controller by implementing viewDidAppear in the ViewController.swift file like so:

@Code(name: "03-load-pdf-03.swift", file: 03-load-pdf-03.swift) {

@Image(source: "swift-document-preview.png", alt: "Screenshot of an iOS device with the PSPDFKit viewer open and document loaded.")

}

}

}

}

table of contents

If you prefer to add an element of gamification to your tutorials, you can also include a small test at the end of your tutorial using the Assessment(opens in a new tab) directive:

@Assessments {

@MultipleChoice {

Nutrient iOS SDK also offers support for visionOS.

@Choice(isCorrect: true) {

Yes

@Justification(reaction: "That's right!") {

Nutrient SDK offers support for iOS, visionOS, and Mac Catalyst.

}

}

@Choice(isCorrect: false) {

No

@Justification(reaction: "Try again!") {

Remember, Nutrient iOS SDK supports multiple platforms.

}

}

}

}

table of contents

Generate and preview the interactive tutorial

To preview the interactive tutorial, use Swift-DocC’s docc preview command, passing in the location of the project’s .docc folder as the parameter:

xcrun docc preview 'Documentation.docc'

You can then preview your interactive tutorial in the browser:

http://localhost:8080/tutorials/nutrient

Tutorials can also be hosted on a web server as a static site; refer to the Apple documentation(opens in a new tab) for more information.

That’s it! You’ve successfully created your first DocC interactive tutorial showing the reader how to create a new iOS application using Xcode, integrating the Nutrient Swift package, and finally, using the SDK to load a sample PDF document.

Conclusion

DocC interactive tutorials is well documented and easy to add to existing frameworks or packages, especially if they’re already set up for DocC documentation. It provides a great developer experience, offering engaging and hands-on examples of common use cases of your frameworks. Additionally, developers can follow the code-along style of the tutorials to get instant feedback while getting to know your frameworks.

DocC interactive tutorials supports even more directives that weren’t covered in this blog post. To learn more, head over to the official documentation(opens in a new tab) to explore these and start building your own tutorials!