Post

Dependency Deep Dives: ChatGPT's iOS App

Analyzing the 42 open source dependencies powering ChatGPT's iOS app architecture.

Dependency Deep Dives: ChatGPT's iOS App

Introduction

Continuing this practical series dissecting real production apps through their third‑party dependencies. iOS developer using ChatGPT daily for AI conversations, code assistance, and creative tasks, analyze how its iOS app assembles authentication, analytics, UI rendering, and data handling with 42 open source libraries. Use this as an architectural lens, not a marketing tour.

SwiftPM & Core Libraries

swift-async-algorithms (apple/swift-async-algorithms) algorithms and utilities for working with Swift concurrency and async sequences.

swift-case-paths (pointfreeco/swift-case-paths) lightweight case paths for embedding and extracting associated enum values.

swift-cmark (swiftlang/swift-cmark) CommonMark reference implementation fork used by Swift for Markdown tooling.

swift-collections (apple/swift-collections) high‑performance, generic data structures like Deque, OrderedSet, OrderedDictionary.

swift-concurrency-extras (pointfreeco/swift-concurrency-extras) utilities for testing and working with Swift Concurrency primitives.

swift-custom-dump (pointfreeco/swift-custom-dump) human‑readable value dump and diff utilities for diagnostics and testing.

swift-log (apple/swift-log) a cross‑platform logging API for Swift with pluggable backends.

swift-markdown (swiftlang/swift-markdown) parse, build, edit, and analyze Markdown documents in Swift.

swift-numerics (apple/swift-numerics) numeric types, protocols, and algorithms including complex numbers.

swift-system (apple/swift-system) idiomatic Swift interfaces to low‑level system calls and types.

swift-tagged (pointfreeco/swift-tagged) zero‑cost wrappers for type‑safe identifiers and domain‑specific tagging.

Authentication & Security

Auth0.swift (auth0/Auth0.swift) authentication and authorization via OAuth 2.0/OIDC with Universal Login and token management.

JWTDecode.swift (auth0/JWTDecode.swift) decode and inspect JWTs in Swift without performing validation.

SimpleKeychain (auth0/SimpleKeychain) small wrapper around Keychain for securely storing credentials.

Analytics & Monitoring

Segment (analytics-ios) (segmentio/analytics-ios) analytics SDK to collect events and route them to multiple destinations.

Datadog SDK (DataDog/dd-sdk-ios) Real User Monitoring, logs, traces, and crash reporting for iOS.

Sentry (getsentry/sentry-cocoa) error and performance monitoring SDK for Apple platforms.

Statsig iOS SDK (statsig-io/ios-sdk) feature gates, experimentation, and analytics for iOS.

UI & Rendering

Highlightr (raspu/Highlightr) iOS/macOS syntax highlighter built on highlight.js with many languages and styles.

iosMath (kostub/iosMath) render LaTeX math equations on iOS using a fast layout engine.

KaTeX iOS (ianarawjo/KaTeX-iOS) iOS wrapper for KaTeX to display LaTeX math using native views.

Lottie (airbnb/lottie-ios) render After Effects animations in real time as vector animations on iOS.

Motion (b3ll/Motion) animation helpers and transitions for building fluid motion in Swift.

SnapKit (SnapKit/SnapKit) a DSL to make Auto Layout easy and declarative in Swift.

STTextKitPlus (krzyzanowskim/STTextKitPlus) extensions and fixes around TextKit 2 for advanced text rendering.

SVGView (exyte/SVGView) SwiftUI/UIKit SVG rendering and animation written in Swift.

Pow (EmergeTools/Pow) delightful, performant SwiftUI animations and transitions.

Media, Realtime & Voice

WebRTC iOS (stasel/WebRTC-iOS) distribution of Google WebRTC frameworks packaged for iOS.

Opus (xiph/opus) open, royalty‑free, highly versatile audio codec for interactive speech and music.

Networking & Events

EventSource (inaka/EventSource) Server‑Sent Events (EventSource) client for iOS.

State, DI, Jobs & Utilities

Factory (hmlongco/Factory) lightweight dependency injection framework for Swift.

Sovran (segmentio/Sovran-Swift) small and efficient state management store for Swift with subscriptions.

SwiftQueue (lucas34/SwiftQueue) job scheduler/queue manager for background tasks with constraints and retries.

JSONSafeEncoding (segmentio/JSONSafeEncoding-Swift) safely encodes JSON by handling NaN/Infinity and other non‑standard values.

Data Formats & Storage

SwiftProtobuf (apple/swift-protobuf) Protocol Buffers implementation and runtime library in Swift.

SwiftCSV (swiftcsv/SwiftCSV) fast CSV parser for Swift supporting headers and custom delimiters.

Imaging & Caching

Kingfisher (onevcat/Kingfisher) lightweight library for downloading and caching images from the web.

Commerce

RevenueCat (RevenueCat/purchases-ios) in‑app purchases and subscriptions management with receipt validation and paywalls.

Testing

swift-snapshot-testing (pointfreeco/swift-snapshot-testing) snapshot testing for Swift/SwiftUI, UIKit, and more.

Crash Reporting

PLCrashReporter (microsoft/plcrashreporter) open‑source in‑process crash reporter for iOS, macOS, and more.

Not Found

Publishable — repository not found on GitHub (listed in app’s dependency images).

Architecture Signals

Modern Swift foundation: Heavy adoption of SwiftPM and first‑party packages (collections, numerics, markdown, log) establishes a strictly typed, standard library‑adjacent core.

Observability first: Datadog + Sentry + Segment + Statsig indicate robust telemetry, experimentation, and continuous product feedback loops.

Security posture: Auth0, JWTDecode, and Keychain wrappers point to standards‑based auth with secure credential storage and token handling.

Rich content rendering: Markdown + syntax highlight + LaTeX/KaTeX + advanced text (TextKit 2) deliver high‑fidelity chat, code, and math output.

Media & realtime: WebRTC + Opus enable high‑quality, low‑latency voice and live sessions; EventSource supports streaming server events.

State & DI discipline: Factory DI, Sovran store, and SwiftQueue suggest modular feature boundaries and reliable background work.

Practical Takeaways

Standardize on SwiftPM: Prefer Apple‑maintained building blocks (collections, numerics, system, log) to reduce risk and improve ergonomics.

Instrument early: Pair Segment for routing with Datadog/Sentry for depth; add Statsig when you need controlled rollouts and experiments.

Treat text as UI: Combine swift-markdown, Highlightr, and TextKit 2 utilities to render mixed content (code/math) without WebViews.

Plan for voice: If voice/AV is on the roadmap, validate WebRTC + Opus integration paths and sandbox resource usage on older devices.

Conclusion

This dependency map reveals ChatGPT’s emphasis on secure auth, observability, rich content rendering, and realtime media for a responsive AI experience.


ChatGPT iOS dependencies screenshot 1 ChatGPT iOS dependencies screenshot 2 ChatGPT iOS dependencies screenshot 3

☕ Support My Work

If you found this post helpful and want to support more content like this, you can buy me a coffee!

Your support helps me continue creating useful articles and tips for fellow developers. Thank you! 🙏

This post is licensed under CC BY 4.0 by the author.