[Telegram Mini Apps] `openLink` always opens external browser
Checklist
- [x] I am reporting an issue in existing functionality that does not work as intended
- [x] I've searched for existing GitHub issues
Description
The Telegram.WebApp.openLink method on iOS always opens links in an external browser. There is no option to open the link in Telegram's in-app browser. In contrast, on Android, links open in the in-app browser by default.
https://github.com/TelegramMessenger/Telegram-iOS/blob/45fa1b5ddb3a9a794bf407cb8d9bf2d0e4643b1f/submodules/WebUI/Sources/WebAppController.swift#L1140
Expected Behavior
Links opened using the openLink method in the Mini App should open in Telegram's in-app browser on iOS if the tryBrowser parameter is not explicitly specified, similar to the behavior on Android.
Actual Behavior
Links opened using the openLink method on iOS are always opened in an external browser, with no option to use the in-app browser.
Steps to Reproduce
- Call the
openLinkmethod with any valid URL and anytryBrowservalue. - Observe that the link is opened in an external browser.
Screenshots and Videos
<button onClick={() => Telegram.WebApp.openLink('https://example.com')}>
Open link
</button>
https://github.com/user-attachments/assets/16d489d7-f5a8-4019-b64d-f80b5a5afd57
Environment
Device: iPhone 15
iOS version: 18.1
App version: 11.6.1
Telegram ios doesn't support in app browser
Telegram ios doesn't support in app browser
For example, a url_button opens link using in-app browser