ArticleZip > Ios 8 Removed Minimal Ui Viewport Property Are There Other Soft Fullscreen Solutions

Ios 8 Removed Minimal Ui Viewport Property Are There Other Soft Fullscreen Solutions

With the release of iOS 8, Apple made some changes that impacted developers working on web applications. One notable change was the removal of support for the `minimal-ui` viewport property. This property was commonly used to create a fullscreen experience on web apps running in Safari on iOS devices. If you are wondering about alternative solutions to achieve a soft fullscreen experience after the removal of `minimal-ui`, you are in the right place. In this article, we will explore some alternatives that can help you achieve a similar result.

One option you can consider is using the `standalone` display mode in combination with the `apple-mobile-web-app-capable` meta tag. When a web app is launched from the home screen in standalone mode, it runs without the Safari UI elements, providing a more immersive user experience. To enable standalone mode, you can set the `apple-mobile-web-app-capable` meta tag to `yes`.

Html

Additionally, you can include the `viewport-fit=cover` CSS property to ensure that your web app content fills the entire screen, making it look more like a native app. This property tells the browser to adjust the viewport size to cover the entire screen, providing a cleaner and more polished appearance.

Css

Another approach you can take is to make use of the `display: standalone` CSS media feature. This feature allows you to apply specific styling when your web app is running in standalone mode. You can adjust the layout, colors, or other aspects of your app's appearance to optimize the user experience in fullscreen mode.

Css

@media (display-mode: standalone) {
  /* Add your custom styles here */
}

Furthermore, you can leverage JavaScript to detect when your web app is running in standalone mode and make any necessary adjustments dynamically. By detecting the absence of browser UI elements, you can customize the behavior and appearance of your app to better suit the fullscreen experience.

Js

if (window.matchMedia('(display-mode: standalone)').matches) {
  // Custom logic for standalone mode
}

In conclusion, while the removal of the `minimal-ui` viewport property in iOS 8 presented a challenge for developers aiming to create a soft fullscreen experience for web apps, there are alternative solutions available. By utilizing features such as the `standalone` display mode, viewport properties, CSS media queries, and JavaScript detection, you can adapt your web app to provide a seamless and immersive fullscreen experience on iOS devices. Experiment with these techniques and tailor them to meet your specific requirements for a visually engaging and user-friendly web application on iOS.