iphone-standalone-web-app

visibilitychange in mobile safari standalone mode

谁都会走 提交于 2021-01-28 09:05:03
问题 The Visibility API doesn't work in standalone mode on iOS. I need to know if the phone was unlocked with my app in the foreground so that I can check for an update, but nothing seems to work. I don't get the visibilitychange event. document.hidden is false, and document.visibilityState is "visible" when the phone is locked. I've also found that timers like setTimeout and requestAnimationFrame continue to function while the screen is locked, so I can't use the hacks I've found to detect that

Getting flash between startup screen and preloader on iOS webapp

孤者浪人 提交于 2020-08-09 12:28:11
问题 I have built the following as test scenario: http://dev.driz.co.uk/Spinner/ for a webapp that will run on an iPhone Chromeless. If you open it up on your iPhone and add it to your homescreen you will see it as a full-screen web app complete with startup screen and preloader. I have made the startup screen and first screen that the user will see the same as per the Apple documentation quoting: " Generally, design a launch image that is identical to the first screen of the app. Avoid including

Getting flash between startup screen and preloader on iOS webapp

别说谁变了你拦得住时间么 提交于 2020-08-09 12:27:59
问题 I have built the following as test scenario: http://dev.driz.co.uk/Spinner/ for a webapp that will run on an iPhone Chromeless. If you open it up on your iPhone and add it to your homescreen you will see it as a full-screen web app complete with startup screen and preloader. I have made the startup screen and first screen that the user will see the same as per the Apple documentation quoting: " Generally, design a launch image that is identical to the first screen of the app. Avoid including

Stop reloading of web app launched from iPhone Home Screen

江枫思渺然 提交于 2020-01-28 13:22:20
问题 I created a web app and added to my iPhone Home Screen. When I switch to another app and back, iPhone automatically reload my web app. This breaks my app flow. How do I prevent iPhone from reloading the app? I have apple-mobile-web-app-capable meta tag enabled to hide Safari toolbar and I don't want to turn it off. 回答1: I just found this related question on SO: Stop native web app from reloading itself upon opening on iOS As it seems it's a limitation of Safari, a proposed solution is to

Stop reloading of web app launched from iPhone Home Screen

点点圈 提交于 2020-01-28 13:21:45
问题 I created a web app and added to my iPhone Home Screen. When I switch to another app and back, iPhone automatically reload my web app. This breaks my app flow. How do I prevent iPhone from reloading the app? I have apple-mobile-web-app-capable meta tag enabled to hide Safari toolbar and I don't want to turn it off. 回答1: I just found this related question on SO: Stop native web app from reloading itself upon opening on iOS As it seems it's a limitation of Safari, a proposed solution is to

Hiding Safari User Interface Components on iPhone

筅森魡賤 提交于 2019-12-29 10:36:52
问题 In an attempt to hide the Safari UI components for an web-app bookmarked as a Homescreen Icon. I am using this meta tag <meta name="apple-mobile-web-app-capable" content="yes" /> as specified on iPhone Dev Center but the address bar and toolbar are still there when launched from the home screen icon. What do I need to do different? Does anyone have an example? 回答1: window.top.scrollTo(0, 1); Works on iPhone, but not in iPad. I have been successful hiding the browser components on iPad (so

iOS Web App: Showing content only if the application is standalone

六月ゝ 毕业季﹏ 提交于 2019-12-29 04:54:08
问题 If a user visits my websites example, from Safari Mobile how could I place there a blank page that says "Add To Homescreen."? Once added it would show different content. 回答1: You'll want to check two things. First, is it running on an iOS device? Second, is window.navigator.standalone == true ? window.navigator.standalone is primarily used by Webkit browsers to indicate the app is in fullscreen (or standalone) mode. Plenty of devices (like phones running Android), support this property, but

Why HTML5 video doesn't play in IOS 8 WebApp(webview)?

故事扮演 提交于 2019-12-28 01:42:15
问题 Simple HTML5 video plays on safari browser. but after adding it to home screen(Standalone WebApp), it doesn't work. It is working on iOS7 but stopped working on iOS8. <!DOCTYPE html> <head> <meta charset="utf-8"> <meta name="apple-mobile-web-app-capable" content="yes" /> <title>HTML5 Video Standalone Test</title> <style> body{ margin:0; } </style> </head> <body> <video src="http://www.jplayer.org/video/m4v/Big_Buck_Bunny_Trailer_480x270_h264aac.m4v" autoplay="autoplay" controls="true" webkit

Fixed positioned elements disappear on page unload

主宰稳场 提交于 2019-12-24 03:39:20
问题 I have a fixed top navigation bar that stays on top of everything while the contents of the page are being scrolled. I noticed that in Chrome for iOS and Safari standalone mode, the fixed bar disappears on page unload before any of the other elements. How to make all the elements, regardless of the positioning, to disappear at the same time? Demo: http://kodu.ut.ee/~b04866/demo/demo.html Load the page in Chrome for iOS, repeatedly click refresh. Observe how the fixed div vanishes first, then

iOS Web App problems with apple-mobile-web-app-capable

夙愿已清 提交于 2019-12-23 04:33:40
问题 I am currently writing a small web app using Asp.net MVC and jQuery mobile. Everything is rendering fine in the desktop test environment and in Safari browser on the iPad. However, when I add <meta name="apple-mobile-web-app-capable" content="yes" /> to the head I start getting some weird behaviors. Here is the beginning of my simple test login page for the explanation below: <%@ Page Title="Test App" Language="C#" Inherits="System.Web.Mvc.ViewPage<TestApp.ViewModels.LoginViewModel>" %> <