TelegramMessenger / TelegramMessenger/Telegram-iOS

WatchOS Telegram app cannot connect under cellular data or without the paired iPhone.

Open
#415 17 comments 21 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Swift
Stars
9k
Forks
2.9k
PR merge metrics
No merged PRs in 30d

Description

Checklist
  • I am reporting an issue in existing functionality that does not work as intended
  • I've searched for existing GitHub issues
Description

Take a GPS + Cellular Apple Watch. Using Bluetooth or Wi-Fi, telegram app works as expected. However, if the watch switches to cellular data or the iPhone is not near, the Telegram app stops working.

Also, using a GPS Apple Watch, you can see that if you turn bluetooth off and iPhones Wifi off, connection does not work either.

This is because the file:

https://github.com/TelegramMessenger/Telegram-iOS/blob/d1641281452cd521148ba82d14dc878d7c8ae498/submodules/WatchBridge/Impl/Sources/TGBridgeServer.m#L4

This class has not been updated for years, and it's using the old school Watch Connectivity framework, that routes all connectivity throught the companion iOS app.

The good way to implement this is using NSURLSession class, which is far more modern and robust. If the iPhone is avaliable, it will route the traffic via bluetooth, but if it isn't, watchOS can communicate with Telegram on its own.

PLEASE consider implementing this feature. It should not be diffcult (NSURLSession is already used in the iOS app to communicate with Telegram), and there's a lot of people that loves leaving their phones and using just their watch to communicate. This would also give an strategical advantage over WhatsApp, that doesn't even have a watch app.

Expected Behavior

Telegram for watchOS should open normally.

Actual Behavior

Telegram for watchOS cannot connect.

Steps to Reproduce

Using GPS+Cellular over cellular:

  1. Turn off bluetooth on the watch
  2. Turn off wifi on the watch
  3. Open Telegram app on the watch

Using GPS+Cellular or GPS over Wi-fi:

  1. Turn off bluetooth on the watch
  2. Turn off wifi on the iPhone
  3. Open Telegram app on the watch
Screenshots and Videos

IMG_0279(2)

Environment

Device: iPhone 12, Watch Series 5 Cellular

iOS version: 14.2

App version: 7.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with submodules/WatchBridge/Impl/Sources/TGBridgeServer.m and review how the current Watch Connectivity path handles traffic between watchOS and the iOS app. Compare that flow with NSURLSession usage in the iOS app and verify the listed cellular and Wi-Fi reproduction steps. Done means Telegram for watchOS can connect when the paired iPhone is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, objective-c, swift
Domain
mobile-dev, networking
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.