You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wrapped inside a standard conform Dom representation created via the aaopen Rendering algo
Browsers got PWA Shortcut Support for https urls
we can trigger it via scripts inside our data urls
Apple example page
<html>
<head>
<title>Apple Page</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#ffffff">
<meta name="apple-mobile-web-app-title" content="Apple Page">
</head>
<body>
<a id="redirect" href="https://apple.com/"></a>
</body>
</html>
<script type="text/javascript">
if (window.navigator.standalone) {
var element = document.getElementById('redirect');
var event = document.createEvent('MouseEvents');
event.initEvent('click', true, true, document.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
setTimeout(function() { element.dispatchEvent(event); }, 25);
} else {
var p = document.createElement('p');
var node = document.createTextNode('SwiftRocks!');
p.appendChild(node);
document.body.appendChild(p);
}
</script>
Try it out! Open this in Safari, press the Share button, add it to your home screen and touch it to see how it works. For a real example, change the link to a deeplink to your app and encode it to base64 to see it in action.
If you try to open a data: page from Swift using open(url), will not work, SFSafariViewController will crash stating that it doesn't understand the URL.
Solution? Run a Local Webserver For Android a Own WebServer is also needed not to open data urls but other additional features
Internal prerequired Knowleg
Browsers in general can render data urls
baste that into your browser you will get
wrapped inside a standard conform Dom representation created via the aaopen Rendering algo
Browsers got PWA Shortcut Support for https urls
we can trigger it via scripts inside our data urls
Apple example page
Try it out! Open this in Safari, press the Share button, add it to your home screen and touch it to see how it works. For a real example, change the link to a deeplink to your app and encode it to base64 to see it in action.
If you try to open a data: page from Swift using open(url), will not work, SFSafariViewController will crash stating that it doesn't understand the URL.
Solution? Run a Local Webserver For Android a Own WebServer is also needed not to open data urls but other additional features
Interristing Reads
The text was updated successfully, but these errors were encountered: