📜 The ultimate solution for showing ad hoc, server-editable web content (FAQs, Tutorials, Privacy Policy, etc.) in your iOS apps

What's New



Nice Photon is available for hire! Talk to us if you have any iOS app development needs. We have 10+ years of experience making iOS apps for top Silicon Valley companies. Reach out at

TelegraphKit allows you to show web-content from in a way that looks & feels native on an iOS device.


"Wait, what on Earth is"

Telegraph is "a publishing tool that lets you create richly formatted posts with photos and all sorts of embedded stuff". It's main advantage is that you can create posts in seconds, with no need for an account and no configuration. And then using TelegraphKit you can easily show these posts in your app.

Built at Nice Photon.
Maintainer: @dreymonde

Huge thanks to @danielpunkass for his post "Supporting Dark Mode: In-App Web Content", it helped us tremendously!


  1. Create a post on There is no need to create an account or configure anything. Tap "PUBLISH" and copy the link.

  2. Add TelegraphKit to your project (see "Installation" section below)

  3. Somewhere in your project:

import TelegraphKit

let url = URL(string: "<your-telegraph-url>")!
let telegraphVC = TelegraphViewController(url: url)
let nvc = UINavigationController(rootViewController: telegraphVC)
self.present(nvc, animated: true)


TelegraphKit is built on top of WKWebView that adds a few extra features specifically for articles:

  • Dark Mode support (Telegraph web-version only supports light mode)
  • Native fonts: TelegraphKit substitutes fonts for Apple system ones in order to achieve that "native look and feel" (this can be configured)
  • Customization: select between system and font styles, hide the author & date section, disable text selection & more.
  • Layout improvements: TelegraphKit makes slight adjustments to the layout of the page to make it look best inside iOS apps
Default look TelegraphKit version
default default

Creating TelegraphViewController

let telegraphVC = TelegraphViewController(url: URL(string: "")!)
// or
let telegraphVC = TelegraphViewController(postID: "This-is-TelegraphKit-02-03")

Customizing the appearance

You can configure the appearance of your TelegraphViewController by using TelegraphViewController.Appearance struct:

let telegraphVC = TelegraphViewController(postID: "<your-post-id>", appearance: .appleSystem)

TelegraphKit provides you with two presets:

--->.appleSystem // (default)

--->.defaultAppearance // (equals .appleSystem by default)

You can fine-tune the appearance by creating it directly:

    fontStyle: TelegraphViewController.Appearance.FontStyle, // .appleSystem or .telegraph
    hideAuthor: Bool,
    darkModeSupport: Bool, // true by default
    disableImageInteraction: Bool, // true by default
    disableSelection: Bool // false by default

To change the default appearance globally, you can modify TelegraphViewController.Appearance.defaultAppearance:

// Somewhere in AppDelegate.swift or similar:
TelegraphViewController.Appearance.defaultAppearance = .telegraph


Swift Package Manager

  1. Click File → Swift Packages → Add Package Dependency.
  2. Enter


  • Swift Tools 5.1.0
View More Packages from this Author


  • None
Last updated: Sun Mar 26 2023 07:46:43 GMT-0500 (GMT-05:00)