Is there a function in ios webview like setCacheMode in android webview? - ios

What feature should I use to allow iOS Webview's web content to be cached only for in the expired time in the server's meta data? I can't find keywords.
In Android Webview I solved it with setCacheMode (default).

Please WBWebKit instead of Webview.
it will give you access for cache setting using the following code:
webView.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);

Related

Hide the url shown in WebViews in iOS when signing in using ADB2C and react-native-msal

Problem:
I want to hide the url that is shown in the WebViews when logging in using ADB2C in iOS.
Platform: React Native
library: react-native-msal
The Url Shown in red
Things I tried: I tried changing the parameters
ios_webviewType?: Ios_MSALWebviewType;
and
ios_presentationStyle?: Ios_ModalPresentationStyle;
But did not find a way to hide the URL.
(Even though wkwebiew hid the url, Google does not support it)
Expected Result: The WebViews should open for selection of account without any url in the top.
Please let me know if any more information is needed. Thank you.
It’s not possible with the type of web view google requires in iOS.

Xamarin.Forms WebView, WKWebViewConfiguration, and Sending "Mobile" Headers

I'm getting back into Xamarin.Forms, and I've discovered a new behavior of iOS 13 Safari on the iPad called "Desktop-Class Browsing." It's covered in detail here:
https://developer.apple.com/videos/play/wwdc2019/203
The problem for me is that I need my Web application to be able to detect if a normal Web browser is viewing it or if it's being viewed by a Xamarin.Forms.WebView. From my Web application, I used to be able to detect a Web view with the user-agent string or with the X-Requested-With header. But if my Web view is running on an iPad on iOS 13, it will enter desktop mode, which yields a desktop Safari user agent a no X-Requested-With header, and I can no longer detect that it is a Web view. This is referenced at 2:56 in the above video.
In a native iOS application, I can apparently use WKWebViewConfiguration to control these desktop-like featuers:
https://developer.apple.com/documentation/webkit/wkwebviewconfiguration
I think this is demonstrated at 9:01 in the video in my first link.
How can I use WKWebViewConfiguration with Xamarin.Forms? I see a WebKit.WKWebViewConfiguration class, but how can I utilize it with Xamarin.Forms.WebView?
Unless you follow the steps in this article, your app is using UIWebView instead of a WKWebView
There are several ways of getting access to editing the WKWebViewConfiguration:
You can use a "Custom Renderer" to implement your own WKWebView as shown in this Official Xamarin Forms example, and edit the WKWebViewConfiguration there.
Another possible way that I haven't tried- You can also implement a WKWebView inside your forms using the steps mentioned here. And then just edit that property.

iOS App with Webview inspecting > find URL

I'm using an iPhone App that has some important information on it, but I also figured out that it uses a webview. And I'm not sure if it's safe; like; is it over https? What URL is being called?
Is there a way you can find out what Website is being called in the webview? Like you can do inspect element when using Safari from OSX with usb-connected iPhone.
UIWebview works for any url you call it with. If your site is https, the communication will be encrypted. Not all requests on UIWebView are not https. You can't inspect element from iPhone/iPad/Simulator. You can do it in web in the mobile view (by using useragent).

Auto refresh UIwebview issue in ios?

I have developed an app in which I load the data into webView. My webpage refresh in every 5 seconds through an ajax call. It is working fine in android. Rendering of page in android is very fast. It doesn't seem that url is reloaded in android but in iOS when page refreshing is very slow. Can anybody please tell me the solution?
Have you tried using WKWebView instead of UIWebView?
Please Refer to Is Safari on iOS 6 caching $.ajax results? link.
I think it will solve your problem if you do not allow cache data to load while refreshing UIWebView

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