Problem
I am developing a Web App and facing an issue with making it expand to full screen on iOS devices. The window.Telegram.WebApp.expand()
method works correctly on Android devices, but on iOS devices, there is still a white space at the bottom of the screen.
Code
Here is the code I am using to attempt full-screen expansion:
if (window.Telegram && window.Telegram.WebApp) {
const webApp = window.Telegram.WebApp;
webApp.expand();
}
The Web App should expand to fill the entire screen on iOS devices, with no white space at the bottom.
What I’ve Tried
I’ve verified that window.Telegram.WebApp.expand()
is called after the Web App loads.
I’ve tested on multiple iOS devices and browsers.
I’ve checked for any CSS or HTML issues that might affect layout.
Additional Context
iOS Version: [iOS 16.1]
Telegram App Version: [8.5.0]
Browser: [Browser used on iOS, e.g., Safari]
Device Type: [iPhone 12]
Questions
- Are there known issues with
window.Telegram.WebApp.expand()
on iOS that cause the Web App not to fully expand? - Are there any alternative methods or best practices to ensure that a Telegram Web App fully occupies the screen on iOS?
- Is there any additional configuration required specifically for iOS to handle full-screen expansion properly?