简体   繁体   English

从apple-touch-icon始终以独立模式启动SAPUI5 Web应用程序

[英]SAPUI5 web application launched from apple-touch-icon always in standalone mode

I have added an icon for my SAPUI5 web app on the home screen of an iPhone. 我已在iPhone的主屏幕上为SAPUI5 Web应用添加了图标。 However it is displayed in standalone mode(full-screen) when launched from the icon even though I haven't added a 但是,即使我尚未添加图标,它也会从图标启动时以独立模式(全屏)显示。

<meta name="apple-mobile-web-app-capable" content="yes">

tag. 标签。 Only if this tag has been added the app should be displayed in full screen mode(hiding the URL bar etc. of Safari). 仅当添加了此标签后,应用程序才应以全屏模式显示(隐藏Safari的URL栏等)。 Even adding 甚至添加

<meta name="apple-mobile-web-app-capable" content="no">

doesn't help. 没有帮助。 As far as I have investigated it seems like this is an issue for apps built with UI5. 据我调查,这似乎是使用UI5构建的应用程序的问题。 For example SAPUI5 DOCUMENTATION is also always displayed in full screen mode when launched from the home icon on iPhone. 例如,从iPhone上的主页图标启动时, SAPUI5 DOCUMENTATION也始终以全屏模式显示。 This is not the case for apps that are built without using UI5 and without the apple-mobile-web-app-capable tag. 对于在不使用UI5且没有apple-mobile-web-app-capable标签的情况下构建的应用程序,情况并非如此。

Also when I comment out the part of my code that loads SAPUI5, the app is not launched in full screen mode. 另外,当我注释掉加载SAPUI5的代码部分时,该应用程序不会以全屏模式启动。

Any suggestions how to display the app in non-standalone mode? 有什么建议如何在非独立模式下显示应用程序?

So I discovered after a lot of debugging that the sap.m.App control creates meta tags in index.html file. 因此,经过大量调试,我发现sap.m.App控件在index.html文件中创建了元标记。 So the solution was to remove the meta tag that sap.m.App has created after the sap.m.App has been initialized. 因此,解决方案是在初始化sap.m.App之后删除sap.m.App创建的元标记。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM