Skip to content
levochkaaPublic

About

Telegram client for iOS

Topics

Resources

Contributing

Stars

96 stars

Watchers

1 watching

Forks

Latest commit

 

History

2,939 Commits

Folders and files

Repository files navigation

BetterTG icon

BetterTG

BetterTG is an open-source Telegram client for iPhone. It is written natively in UIKit on top of TDLib, follows the official Telegram app's behaviour and keeps a look of its own.

BetterTG was created by Lev Poznyakov. It is in development; 0.1.0 is the first version.

Website: bettertg.su

Screenshots

Chat list with folders A chat with a photo, a reply, reactions and a voice message A group with a pinned message, a photo and a poll A message's menu with reactions

Search with people and recent chats The attachment sheet with three photos picked A profile with shared media Settings

On iPhone Duo, the list and the chat sit side by side while it is unfolded:

iPhone Duo, unfolded: the chat list beside a chat

The people and chats in these screenshots are made up. docs/screenshots has more of them, such as the channel, the archive and the rest of the attachment sheet.

Features

  • A chat list with folders, the archive, pinned chats and search across chats, messages and public channels.
  • Messages with formatting, replies, edits, forwards, reactions, polls, locations and contacts.
  • Photos, videos, albums, files, GIFs, stickers, and custom and animated emoji.
  • Voice and video messages, recorded and played in the chat.
  • Groups with forum topics, channels with comments, stories, bots with keyboards, inline bots and mini apps.
  • Profiles and Telegram's settings: privacy, notifications, data and storage, devices, passcode and proxy.
  • Several accounts on one device.
  • iPhone Duo in every posture, with the list and the chat in two columns while it is unfolded.
  • iPad, with the chat list and the chat in two columns in windows wider than 690 pt and taller than 650 pt (full screen in both orientations, as on the unfolded iPhone Duo), and one stack in narrow iPadOS windows with bar buttons starting after the window controls.
  • Rich notifications with avatars, media and quick replies, through the push relay.

Repository

Path Contents
BetterTG The app: UIKit screens, TDLib services and media playback
BetterTGNotificationService The notification service extension behind rich notifications
Packages/FFmpegBridge FFmpeg for video, GIF and voice message playback and voice encoding
Packages/RLottie Telegram's rlottie fork for animated stickers and emoji
Backend The Rust push relay (README)
Website bettertg.su, with the privacy policy and terms
Configuration Signing identity and push relay settings
script, fastlane Build, setup and release tooling
docs Notes on individual features and on releasing

Building

You need a Mac with Xcode 27.2 at /Applications/Xcode-27.2.0.app (pass --xcode PATH for another location), XcodeGen, SwiftFormat and jq (brew install xcodegen swiftformat jq), and a Telegram api_id and api_hash from my.telegram.org → API development tools.

./setup.sh               # asks for the api_id and api_hash
./build.sh build         # build for the Simulator
./build.sh run           # build and launch in the Simulator
./build.sh run --device  # build and launch on a connected iPhone

A device build needs your own team and bundle ID: ./setup.sh --team TEAMID --bundle-id com.example.BetterTG. ./setup.sh --help and ./build.sh --help list every option. docs/releasing.md covers TestFlight and App Store builds.

Push notifications

Telegram delivers notifications to third-party apps only through Web Push, which an iPhone app can't receive on its own. BetterTG's relay in Backend receives them at push.bettertg.su, decrypts each one to show the sender and a preview, and hands it to Apple's push service. It doesn't sign in to Telegram, and it keeps a decrypted notification for 15 minutes at most. The Privacy Policy lists everything the relay stores.

Turning off Notifications via BetterTG Server in Settings → Notifications and Sounds deletes the device's data from the relay; BetterTG then notifies only while it is open. A fork signed with its own bundle ID can't use the official relay: Backend/SELF-HOSTING.md explains how to run one, or ./setup.sh --no-relay builds without it.

Contributing

Contributions are welcome. CONTRIBUTING.md covers setup, conventions and pull requests.

License

BetterTG is released under the GNU General Public License v3.0. You may use, change and share it, commercially too, as long as what you distribute stays under the same license and comes with its source code.

Copyright © 2022–2026 Lev Poznyakov and the BetterTG contributors. BetterTG ports code and assets from Telegram for iOS, licensed under GPL-2.0-or-later, and includes the open-source components listed in Settings → Licenses, whose texts are in BetterTG/Resources/Licenses.

BetterTG is an independent project. It is not affiliated with, endorsed by or sponsored by Telegram. Telegram is a trademark of its owner.

About

Telegram client for iOS

Topics

Resources

Contributing

Stars

96 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages