SDK

Swift Markdown Kit

An iOS Markdown rendering SDK with examples and documentation.

See it in action

<think>
Adam adapts a per-parameter step
size, so the flat directions here
move as fast as the steep ones.
SGD is stuck with one rate.
</think>
Both minimise the same loss

$$L = \sum_{i=1}^{n} (y_i - \hat{y}_i)^2$$

but Adam rescales each step by a
running estimate of the gradient's
second moment:

| Optimiser | Steps | Loss  |
| --------- | ----: | ----: |
| SGD       | 1,200 | 0.043 |
| Adam      |   380 | 0.011 |

```swift
opt.step(lr: 3e-4)
```

So the same tolerance is reached in
Light
Dark

On the left is the raw token stream a model produces; on the right, how it renders under two themes. The reasoning panel folds itself away once the answer starts. Refer to the demo project for actual device and simulator output.

On a real iPhone

A screen recording on an iPhone: the reasoning arrives first and folds itself away, the answer streams in, and the formulas are typeset while they are still being written.

Streaming rendering

startStreaming() accepts an LLM token stream. Incremental scanning parses only new content, so total rendering work grows linearly with final length instead of reparsing the entire document for every chunk.

Chat mode

MarkdownChatRenderView carries a whole conversation in one renderer and updates only the current message while streaming—not one renderer per message.

Theme tokens

Start with the built-in .system or .github preset, then override colors, corner radii, and heading sizes by token. Changes apply at runtime without repackaging the framework.

Custom syntax

Declaratively register inline extensions such as @mention, $AAPL, and [[Wikilink]]. Matches emit the name and captured value as events and use the same theme-token system.

WHAT YOU GET

After purchase

Each item below describes behavior that is already implemented.

Delivery
Download from your account after payment
License
All apps under one developer account · 12 months of updates
Billing
One-time purchase, no automatic renewal

Still deciding?

Pricing, license scope, refunds, and common questions are covered on the pricing page. Contact us with specific integration questions.