WKWebView/UIWebView get website icon - ios

How can I get the apple-touch-icon or logo of the website using WKWebView or UIWebView? I've read that getting a favicon is possible, however I plan on using the website's logo as a short cut like in iOS Safari and a favicon is too small for it. Is there a way to scrape metadata from a website in webView to get <link rel="apple-touch-icon" href="apple-touch-icon.png">?

In Firefox for iOS we use a User Script (Link to code on Github) to find the icon that then passes them back to the application which downloads them using native code (Link to code on Github).

Related

iFrame block not showing up in the iPhone

I have a hybrid mobile app in Mendix. In one page of the app, I am displaying some data with text and also video or website URL embedded.
<iframe id="quizWidget-454107" width="100%" height="900px" frameborder="0" border="none" src="https://www.qzzr.com/widget/quiz/fi9xdWl6emVzLzQ1NDEwNw"></iframe>
Here we are embedding this website, and we also embed youtube URL here.
The issue is, this embedded URL(video/website) shows up in a section on Android phone but not in iPhone. May be Safari does not render iFrame correctly.
Any idea what we can replace iFrame with?
please see an answer to a related question here. I believe You need to add <meta> tags to your index.html page to allow the app to load external content, preferable using a Content Security Policy (CSP).

Set default link for iOS webapp

I'm playing around with iOS' webapps.
I'd like to configure the webapp to save to the user's home screen with a different url from the original web page.
On Android, you can change "start_url" in the manifest.json to achieve this.
The various customisation options on iOS seem to be less well documented. But I'm hoping there's a meta tag I can use, similar to this one that changes the web app title:
<meta name="apple-mobile-web-app-title" content="[your title]" />
which is documented in this question.
As of iOS 11.3, Safari now supports web app manifests, making it possible to specify the start URL. Learn more here.

Cordova and iOS: Playing an audio from an iframe hosted in cdvfile://localhost

I have the following issue:
- In an iOS Cordova application, I downloaded an html page and its resources (css, audio, images) in cdvfile://localhost/persistent/myfolder/
- I load cdvfile://localhost/persistent/myfolder/index.html in an iframe.
- The page is properly displayed (css and images) but audios are not being able to load and play... a popup with "unsupported url" appears when trying to execute the audio...
I found lot of articles/post regarding this issue, but none of them have the particularity of playing audios from an iframe (I need to use an iframe, this is a must in my project)...
Any ideas? Remember than I'm not having access to cordova's plugins inside the iframe :-/

is it possible to use iframe in phonegap ios application

I've tried a lot of code samples and methods but nothing works.. iframes in phonegap application doesn't load url in src attribute.
I want to learn is it possible to use iframe in a phonegap iOS application. And is there a way to show a website inside my app (except InAppBrowser). InAppBrowser just backgrounds my app and open safari. I want to show a url inside my own interface.
Yes you can have iFrames in your app to show some web pages but you have to be careful about which website you want to load in iFrame because most of the popular websites (FB, Twitter etc) doesn't allow their website to be rendered in iFrame using META tags like this:
<meta http-equiv="X-Frame-Options" content="deny" />

Titanium webview iframe doesnt seem to store cookies

I am developing an app using Appcelerators Titanium. The app consists of a webview. The webview shows i local page, iframe.html, and this iframe's src is pointed to a remote page.
However, this doesn't work out as i expected since it doesn't seem like the remote page can't store cookies when wrapped in an iframe. It works great on desktop and other devices. This seems to be an issue exclusive to iOS. I need the iframe, and i need cookies. What can i do to solve this?

Resources