Swiftgram / TDLibKit
Native Swift wrapper for Telegram's TDLib. Available on iOS, macOS, watchOS, tvOS and visionOS.
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing Swiftgram/TDLibKit in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewTDLibKit TDLibKit is a native Swift wrapper for TDLib with support for iOS, macOS, watchOS, tvOS and visionOS. Powered by pre-built multi-platform TDLibFramework implementation of TDLib and generated sources with tl2swift Installation Xcode • Install Latest Xcode • Add as SPM dependency in . This could take a while cause it downloads ~300mb zip file with binary from TDLibFramework dependency • Add as your target dependency. • Code! Cocoapods Integration requires similar to TDLibFramework Cocoapods & Flutter guide adaptation. Usage Library provides multiple API interfaces based on different approaches • Async/Await syntax & do/catch. Available for iOS 13.0+, macOS 10.15+, watchOS 6.0+, tvOS 13.0+, visionOS • Completion handlers & closures Create client Manager Make sure to create only one , since can be only called from a single thread. Manager automatically polls for new updates, we will handle them per-client below. Create Client & Handle updates Synchronious requests Only for methods with "Can be called synchronously" in docs Async requests Async/Await Completion Handlers Logging You can pass additional parameter with type to log "send, receive, execute" and custom entries. Close client To ensure data integrity, you must properly close all the clients on app termination, either with or use a blocking function Build You can find more about build process in Github Actions file. Credits • Anton Glezman for Build Guide , TL Scheme parser and basic implementation • Leo Mehlig for TDLib-iOS and contributions to run TDLib on Swift • Telegram Team for TDLib License MIT