Skip to main content

Requirements

Before installing MarkdownView, ensure your project meets these requirements:
  • iOS 16.0+ / macOS 13.0+ / visionOS 1.0+
  • Swift 5.9+
  • Xcode 15.0+

Swift Package Manager

Swift Package Manager is the recommended way to install MarkdownView. Add it to your project using one of the following methods:

Xcode

1

Open your project in Xcode

Launch Xcode and open your project or workspace.
2

Add package dependency

Navigate to File > Add Package Dependencies…
3

Enter repository URL

Paste the repository URL:
https://github.com/HumanInterfaceDesign/MarkdownView
4

Select version

Choose the version rule (e.g., “Up to Next Major Version”) and click Add Package.
5

Add to target

Select the target(s) you want to add MarkdownView to and click Add Package.

Package.swift

If you’re building a Swift package or prefer to manage dependencies manually, add MarkdownView to your Package.swift file:
Package.swift
import PackageDescription

let package = Package(
    name: "YourPackage",
    platforms: [
        .iOS(.v16),
        .macOS(.v13),
        .visionOS(.v1),
    ],
    dependencies: [
        .package(url: "https://github.com/HumanInterfaceDesign/MarkdownView", from: "1.0.0"),
    ],
    targets: [
        .target(
            name: "YourTarget",
            dependencies: [
                .product(name: "MarkdownView", package: "MarkdownView"),
                .product(name: "MarkdownParser", package: "MarkdownView"),
            ]
        ),
    ]
)
MarkdownView provides two products:
  • MarkdownView — The complete rendering framework
  • MarkdownParser — Standalone parser if you only need markdown parsing

Import modules

Once installed, import the modules in your Swift files:
import MarkdownView
import MarkdownParser

Next steps

Quickstart guide

Learn how to render your first markdown view

Build docs developers (and LLMs) love