Load local html file in wkwebview ios
I’ve put some code together to move web-type files (html, js, css, etc. In the HTML file, include a chart instance that will render the chart in our app inside WKWebView, which we will learn to create later. The good thing about WKWebView is that it does Jun 15, 2012 · It is possible to open local HTML files in Safari on iPad2. loadRequest for local HTML files, while not clearly extending this to other data types. Click the Load Data button to display a local image file’s content in the WKWebView. I had the same problem with WKWebView as it can not load both html strings and images at the same time for security purposes. The WKWebView is a modern API applying all the modern web security mechanisms, it’s still maintained by Apple and gets updates. API reference. html in the following way: class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { var webView: WKWebView! override func loadView () { webView = WKWebView () view = webView } override func In simulators, some part of macOS file system is simulated as an iOS devices file system, but the protection of Sandboxing is sort of loose and the process of WKWebView can access the Documents directory of the app. If you’re working with local files (text files, images, videos), you’ll need to make sure that the path of file does not have file:// in front of it. html in the following way: class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { var webView: WKWebView! override func loadView () { webView = WKWebView () view = webView } override func About Wkwebview Getusermedia 13 Ios . In this blog post you will create a simple web browser with some basic features such as displaying content, back and forward. WKWebView – WKWebView is used in our app. Luckily this has been fixed, but those fixes can take time to land, and even longer for users to upgrade to the latest OS version. Oct 23, 2020 · But it is not working in cordova-ios-6. This is problematic for standard Cordova apps, because these use file:// URLs to load the app. externalDataDirectory ). JavaScript exception when calling a function via `evaluateJavaScript` on WKWebView, which has a local . BSD-3-Clause ( LICENSE) Dependencies. If you want to load a file located at a specified path, you will need to add the path_provider to the pubspec. About Wkwebview Getusermedia 13 Ios . The old version of this plugin used a local webserver to load your main document. /* @abstract A Boolean value indicating whether magnify gestures will. It provides several methods to load Html URL pages, local Html files, etc. Use of Swift WKWebView. The default is false. There is currently no ETA for the next major release. In iTunes, select the app from the list in the File Sharing section. The Html file should be imported into the Xcode project. WebViewGold is an Xcode package using the WebView approach that wraps your URL (or local HTML) into a real, native iOS app using the advanced WKWebView technology and smart performance mechanisms! An excellent approach to gain access to millions of App Store customers. Cordova WKWebView File XHR Plugin. WebKit. Ionic now uses WKWebview by default when building for iOS. In the above samples, we are setting up loadStarted and loadFinished events. Install the target iOS app on the target device. 0. After restarting the application, cookies will be deleted for the nonPersistentDataStore configuration. Since iOS 2. WKWebView is that API you should use to load web content in your application. 0 and iPadOS 14. 3 and fixed in iOS 13. 2017) después de volver a probarlo en iOS 10. This opens a new page with the webview which will look for an html file in local storage then must replace the links of the css files in this html page. WKWebView: rendering and presentation of web pages Dec 29, 2021 · WKWebView was introduced back in 2014 with iOS 8 to replace the old UIWebView, but in order to implement custom url scheme we had to wait for iOS 11 that added WKURLSchemeHandler for that purpose. The instances must be created programmatically. May 24, 2021 · Accessing local files in the file system # Set the withLocalUrl option to true in the launch function or in the Webview scaffold to enable support for local URLs. IOS- tap on textarea crash in WKWebView. Jun 18, 2020 · With Titanium SDK 8. The string parameter is the Html file content string. html in the following way: class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { var webView: WKWebView! override func loadView () { webView = WKWebView () view = webView } override func Sep 01, 2016 · 【iOS开发】WKWebView学习笔记(1)UIWebView的3种load和WKWebView的4种load. Aug 02, 2019 · After that we can already setup the code that will load the web page in the function loadPage (in this case, to keep the example as simple as possible, the webpage is loaded from a local file in 0. My procedure is working for iOS 8, 9, 11 but not for 10. WebView. WKWebView has a user_agent property that can be used to retrieve or set a value reported to the server when Oct 19, 2020 · When you need to use a WKWebView to show content in your App, generally you load it from a remote web server. I read again the documentation about routes to see if something has changed but no. Defaults to Apr 04, 2021 · Preface After IOS 8, Apple launched wkwebview, which has greatly improved the processing speed and memory performance compared with the previous uiwebview! Let me share the interaction between wkwebview and JS First, use wkwebview. But using CertVerifier is easier for WKWebView Declaration Important Starting in iOS 8. Apparently, latest iOS9 beta allows you to load a local file. Jul 17, 2014 · This code example shows how to use the new WKWebView rather than the old UIWebView with Objective-C. We use this interface to communicate with the webview from the Javascript SDK; class NativeCallHandler: NSObject, WKScriptMessageHandler { var SDKWebView: WKWebView? var SDKParentView: UIView? init (webView: WKWebView?, parentView: UIView? Wkwebview content size Wkwebview content size Jan 23, 2022 · Install Apple's utility Apple Configurator 2 from macOS store. The latest version, 3. There is just white space in the Do you have an idea why it's working for iOS 8,9,11 but not for iOS 10. SFWebView. On the next screen name the class 'WebViewController', subclass the 'UIViewController' and choose 'Swift' for the language. android:layout_height="wrap_content". This is the main reason Cordova has been able to add official support for WKWebView in iOS 9. Right click on device and select Add/Apps. To avoid any possible data leaks, you must load UIStoryBoard with the WKWebView component after the initialization of the SDK. 0でWKWebView Engineが本体に統合されました。そのため、Cordova iOS Jan 16, 2022 · I’d like to reiterate this subject: Embedded Player within ios webbased mobile app (e. 1 (and earlier). But when I use it to load and display the Html page in iOS version 9 and later, I find it can not display … iOS : How can I load a local HTML file into the UIWebView? [ Beautify Your Computer : https://www. To review, open the file in an editor that reveals hidden Unicode characters. Before when running content through the old webView this was done automatically so no additional setup was needed. 3 This methods allows WKWebView to properly read your hierarchy of directories and sub-directories for linked CSS, JS and most other files. Mar 18, 2021 · navigator. On iOS the WebView widget is backed by a WKWebView; On Android the WebView widget is backed by a WebView. html): Esta es una versión simplificada de lo que he usado para cargar files locales en un proyecto mío (iOS 10, Swift 3). Can be a local or remote file. We will learn how to do that in this step. Aug 01, 2021 · WKWebView does load resources from local document folder WKWebView not loading webpage - renders blank screen in Swift iOS 13 Swift 5 wkwebview - display image from documents directory into wkwebview real device Aug 07, 2017 · Hi, I have checked 3 similar threads (attached at end), but none is exactly the same issue as I have. Go the the URL listed in the Web Sharing panel from your iPhone, while on the home network, and open the html file. The cordova-plugin-ionic-webview plugin has many fixes necessary for Ionic Apps, but it doesn't fix the issue whereby the iOS WKWebView does not allow for cookies to be used via XHR requests. Its successor, WKWebView, of course, does the same thing functionally but has some advantages over the old UIWebView. By default, on iOS, the WKWebView forbids any load of local files through AJAX even when opening a local HTML file. MIT. When I develop an iOS app with Xcode, I design the user interface by edit the Main. addSubview(webView) But in beta 4, I Dec 17, 2017 · when you load your content into WKWebView, you might set the wrong baseURL for your webpage, and it leads to invalid link, in order for it working correctly, you should have your baseURL set to the correct http or https URL for your content, for those working link just because they had full url in their href. html in the following way: class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { var webView: WKWebView! override func loadView () { webView = WKWebView () view = webView } override func iOS UIWebView loads local html files, does not display resource images, does not load css style; WKWebView loads local html height is not the same; Android10 Glide loads the local image does not display the problem solving; IOS development (7) WKWebView loads local HTML, CSS, JS files JS (solve the problem of accessing other resource paths in html) share local storage wkwebview swift. 0, HTTP URLs or HTML apps that use HTTP for loading external resources will result in blank or half-loaded pages. html ] iOS : How can I load a loca Oct 07, 2021 · WKWebView on iOS devices. Then i load this index. Is it possible to set a base url of the WkWebview? an example would be app. Replace the "app. Jun 26, 2020 · For iOS 14. 11. I am trying to load a local html file in a WKWebView for a iOS app (Swift 4. The ‘SFWebView’ is the Safari WebView. 0webview_flutter_wkwebview: ^2. Set wkwebviewconfiguration. The code has been patched in WebKit2, but the patch hasn’t been downstreamed into iOS yet. 1 & Xcode 7. UITextEffectsWindow should not become key. uri (string) - The URI to load in the WebView. html in the following way: class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { var webView: WKWebView! override func loadView () { webView = WKWebView () view = webView } override func iOS UIWebView loads local html files, does not display resource images, does not load css style; WKWebView loads local html height is not the same; Android10 Glide loads the local image does not display the problem solving; IOS development (7) WKWebView loads local HTML, CSS, JS files JS (solve the problem of accessing other resource paths in html) Mar 12, 2019 · Full support for latest iOS 12 and newest iOS lineup including iPhone XS; Easy: Just define your URL (or your local HTML folder) and WebViewGold takes care of the rest! Native iOS activity indicator while loading your URL; Native Offline screen with „Try again“ button if your app is offline; File Uploads & Geolocation supported Mar 27, 2015 · @brentvatne I'll work on creating WKWebView component - I think it could be useful with something like what @joewood mentioned Telerik did, with some sort of min-http server, that serves a local file over an http server. to-print-a-local-html-with-local-images load the html string in a WKWebView the css is loaded since I can First, we create a new instance of Apple's WKWebView web browser component and assign it to the webView property. WebViews can load content remotely and locally from the app data directory. This may change in the future. It now appears to be a regression in iOS 14 from the bug 204109 . On Android its working perfect but in the iOS App the iframe will not be shown and no player is available. A drop-in replacement of UIWebView for boosted performance and enhanced HTML5 support. xcworkspace file in Xcode, not the . Even it looks pretty simple (load HTML and render it in special view) Like render some HTML or load web page by URL. No coding, no more plugins needed. 0 copied to clipboard. With Apple finally release a deadline for all apps to migrate away from UIWebView, this series and this post is here to help you explore the features of WKWebView. html file. Selectors. Before using uiwebview, when the app store download link is encountered, for example: I load a local html file (from assets folder) to the app WebView. g. Not until we have the project build can we use the Safari debugger. In those HTML pages I want to use css files and graphic images which have ben previously loaded from the server and stored loacally by the app (kind of a cache to save bandwidth). let myUrl = myProjectBundle. And you are there. The object passed to source can have either of the following shapes: Load uri. querySelector and document You can do this in Xcode by going to the File menu, selecting New -> File. Last time I checked (a few months ago) you couldn't use file:/// with a WKWebView at least on iOS8. We are going to create an Extension of WKWebView and Extension of UIPrintPageRenderer. Jul 18, 2020 · If using a custom scheme, WKWebView won't allow to load file urls in img/video tags (nor fetch them, nor anything). So at client end. html in the following way: class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { var webView: WKWebView! override func loadView () { webView = WKWebView () view = webView } override func WebKit. What I tried: I would like to be able to detect these scenarios: iOS and WKWebView; iOS and Safari; not iOS. 9. If you are new to WKWebView, checkout the WKWebView: Getting Started guide for basics on WKWebView The problem is if the html file is loaded from local file system using "file://" scheme, then the wkwebview will set the request origin as null, and on server side CORS does not to set allowed origin to "null". 112. By default May 30, 2019 · Stack Exchange network consists of 178 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. 0-13. 3 seems to add finally video capabilities to webRTC for WKWebview-Apps. RC. This is perfect for web based mobile aplications like Ionic. WebView (as Apple has deprecated UIWebView). html. Which worked so far (finally!) as expected, and I only had one real problem remaining: It seems like it need to run on “https://”, even on localhost. iOS WKWebView intercept input=file and resize image. Note that, on iOS, the localUrlScope option also needs to be set to a path to a directory. the url is a remote server. Just simulated iOS11 on iPhone X and same problem. Currently when loading a local html file it gets a really long URL: like such This is fairly annoying when some of my JavaScript is checking the url for routing. We need to secure access to the local webserver, probably through a session token in the header, since background apps can have access to the webserver. Benché WKWebView sia stato introdotto in iOS 8, c’era un bug in WKWebView che era stato risolto solo in iOS 11, che si -initWithCoder: sempre in -initWithCoder: in runtime e impediva quindi la configurazione di uno all’interno di Interface Builder. html in the following way: class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { var webView: WKWebView! override func loadView () { webView = WKWebView () view = webView } override func Oct 19, 2018 — When developing an iOS application using Xamarin. 2 simulator with any WKWebView iOS application, navigate to any locally served HTML file, then add a script tag with any remote URL, then throttle your Internet connection to “100% Loss” using Apple’s Network Link Conditioner. 0 and run on iOS. 3? Can somebody reproduce this problem? Kind regards and have a nice day!Instead of locally storing the images and referencing them in the HTML files, I'm now instead converting the images to Base64 and then adding them to the HTML. Aug 07, 2017 · Hi, I have checked 3 similar threads (attached at end), but none is exactly the same issue as I have. Sep 18, 2015 · One of the most awaited features is now here: loading local files into WKWebView. Nov 21, 2017 · WKWebView can be initialised with a custom configuration including its user agent and its data store for the session. This action fails, and I'm guessing because of a different origin issue (cross domain). Jan 16, 2022 · I’d like to reiterate this subject: Embedded Player within ios webbased mobile app (e. This only occurs on iOS 13 beta 3 (public), This is not reproduceable in Learn iOS - Load local HTML file in webView. framework to default template: Mar 03, 2020 · To do so, create a WKWebView object, set it as the view, and send it a request to load web content. Edit: Swift 3 The WebView module allows loading Web page inside a NativeScript application or displaying static HTML content with rich CSS. Sign-out and sign-in to refresh the known app list. 3. html): Oct 07, 2015 · The HTML files for this website are stored in the App's bundle (a file:// URL), and need to be able to access various images, CSS files, JS files, and other resources that are stored in the same directory in the bundle (there are relative URLS in the HTML for this purpose, I believe). Oct 16, 2020 · The application contains a zip file (ressources. A dialogue box appears with "/var/Mobile" title. 1 Existing Webview Components. A Flutter plugin that provides a WebView widget based on Apple's WKWebView control. BlackBerry Dynamics SDK for iOS. On iOS, this is the default Objective-C UIWebView or a custom WKWebView class; on Android, this is android. Local Site Content – If you have a local website, add your webisete in www folder located in the app and make sure that you have index. Take notes Problem […] Tags: App embedded , html5 , Local cache , webview How WebView adapts H5 to upload photos or video files Dec 03, 2018 · I simply save this as an . 4 is a known WKWebView issue, where CORS is now respected and cannot load files from file:// urls, only http*:// urls are Tags: ios,cookies,uiwebview,ios8,wkwebview. then select the Empty file name it as home. Import the folder of local web files anywhere into your project. Nov 12, 2021 · webview_flutter_wkwebview 2. The “WK” prefix comes from the WebKit, the browser engine. December 14, 2021; mount sinai plastic surgery cost; Posted by; captain marvel and thor Nov 05, 2021 · Hello forum! I have a special problem with my iOS App. ) to the temp directory location. We use WKWebview to embed content in our iOS app. viewDidLoad () startLoading () webview. So also to ionic and capacitor. Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20. html in the following way: class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { var webView: WKWebView! override func loadView () { webView = WKWebView () view = webView } override func Feb 22, 2019 · The WKWebView class provides another method Now we have the answer to loading asset file in iOS webview: The dart code below creates the WebView and renders the local assets/three. Click the first button to load the local Html file in the WKWebView object. getUserMedia would only work if the HTML file in question was loaded via http(s) origins. It also lets you setup a controller to inject scripts or post messages to a web view. Unable to load HTML nested content like CSS files in WKWebView This plugin makes Cordova use the WKWebView component instead of the default UIWebView component, and is installable only on a system with the iOS 9. Note to choose Storyboard. WebView in Pythonista is UIWebView, which has been deprecated since iOS 8. html in the following way: class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { var webView: WKWebView! override func loadView () { webView = WKWebView () view = webView } override func New WebView fails to load html files stored in the app with the error: default 11 : 34 : 49. Below is this html file Load Local HTML File to a WKWebView. Every major browser and platform has support for service workers and are using the web manifest file in some form or fashion. On iOS 10. cordova. Two functions must be implemented to conform to the protocol: a start function called when the handler needs to load a resource, and a stop function Mar 05, 2020 · I tested it with an App, which (seems to load) the page in a WKWebView and it actually worked with iOS 14. * Adding new APIs was a huge pain in the ass, you had to write all of this ugly bridge code in Objective C Jan 30, 2022 · Show activity on this post. Questions: For previous iOS 8 betas, load a local web app (in Bundle) and it works fine for both UIWebView and WKWebView, and I even ported a web game using the new WKWebView API. send html file express html lazy loading images ; c# get url html Feb 19, 2020 · Note: 2020/03/03追記 MonacaもCordova iOS 5. Yes, I missed out the second line, and that's because it introduces new concept: delegation. The loadStarted event will be executed when the WebView source start loading and loadFinished will be fired when the source is already loaded. So in iOS 8, it will simple ignores these two properties. Dec 17, 2021 · There are some specific ads that are not clickable. iOS, we have a WKWebView that displays our own website inside. This is a complete guide (in Swift!) to implementing your view controller that has a WKWebView, for the purpose of Feb 06, 2018 · Hello, I have a local html build which loads content dynamically, so therefore it needs localhost to run. Forms team worked to make a replacement WKWebViewRenderer. iOS 9+ ads now use WKWebView instead of Jan 30, 2022 · Show activity on this post. This class implements a bridge between the native and Javascript realms. css is loaded locally from the app's resource directory. Steps to reproduce: Create a Classic "Default Project" app. z" At the command line prompt, type pod install to update your workspace with the dependencies. Step 2: Loading the local web files in WKWebView. or still can't believe it?! But it opens that full-screen capturing UI which @Bernard Baker mentioned. webkit. html in the following way: class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { var webView: WKWebView! override func loadView () { webView = WKWebView () view = webView } override func [WKWebView][iOS 8] Use local webserver option to load local HTML file from www: Closed: Shazron Abdullah 5. In general WebViews have the capability of injecting dynamic HTML content, Javascript code or CSS styles to the web content loaded in it. cannot change window. htmlをWKWebViewにロードする方法。 どんな助けでも大いに感謝します。 ios swift webview zip wkwebview Feb 24, 2018 · Apple make a point of advising you to not use . Implementation of web content loading progress bar and title 4. Loading local web files is really easy. viewDidLoad() webView Add unlimited file types that should trigger the built-in file downloader New optional fallback switch mode: Use local HTML folder if the user is offline, and use the remote URL if the user is online New language option: Append the user system language to the WebView URL The problem is if the html file is loaded from local file system using "file://" scheme, then the wkwebview will set the request origin as null, and on server side CORS does not to set allowed origin to "null". Is it possible to set a base url of the WkWebview ? an example would be app. Nov 17, 2017 · Highlighted. Don't install the app - go to Finder and: Jan 30, 2022 · Show activity on this post. Edit: Swift 3 @janpio this is iOS12 Beta, I'm running Framework 7 with VueJS 2 and Cordova 8. Add WebKit. The below code example demonstrates how to: Load HTML file from our bundle, Load JavaScript code from a local file, Create WKUserScript object, Add JavaScript into an HTML document. preface. Previously it could load files from any location. Updated for Xcode 9. En las aplicaciones que se ejecutan en iOS 8 y posteriores, use la class WKWebView en lugar de utilizar UIWebView. html in the following way: class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { var webView: WKWebView! override func loadView () { webView = WKWebView () view = webView } override func Wkwebview, introduced in ios 8 and os x yosemitewhich replaces uiwebview in uikit and webview in appkit ui, it is used to open safari browser outside the app. You should provide this with a URL to some HTML file that you know is in your bundle, along with another URL that stores any other files you want to allow the web view to read. Alas, there are quite a few breaking changes preventing a smooth switch to WKWebView in new Cordova apps. . From System Prefs > Sharing > Enable Web Sharing. mainBundle(). The flag will also be removed in the next major release as WKWebView will be Cordova's default webview. It is the centerpiece of the modern WebKit API introduced in iOS 8 & OS X Jan 30, 2022 · Show activity on this post. Of course it's also possible to specify a remote URL. url(forResource: “my-html-file”,… wkwebview start loading delegate. dataDirectory - Persistent and private data storage within the application's sandbox using internal memory (on Android, if you need to use external memory, use . I tried to divide myCurrently when loading a local html file it gets a really long URL: like such This is fairly annoying when some of my JavaScript is checking the url for routing . In the Swift language, it is possible to add a JavaScript file or code into a WKWebView and run it from our app. html in the following way: class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { var webView: WKWebView! override func loadView () { webView = WKWebView () view = webView } override func Ios WKWebView loads the local html, so some pictures will not be displayed. Oct 16, 2020 · # Implementation when displaying advertisements with iOS WKWebView. 0 / Hybrid App Template 5. Sample is a here. csv file in Python Jan 30, 2022 · Show activity on this post. Load HTML file from our bundle :- In… Read More This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. 1My code uses WKWebView and loads index. In order to have the advertisement display properly in WebView, you need to change App Transport Security settings. html in the following way: class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { var webView: WKWebView! override func loadView () { webView = WKWebView () view = webView } override func Support for WKWebView. html ] iOS : Swift WKWebView Jul 18, 2019 · IOS WKWebView load simple html page. Mar 18, 2020 · The next major release of cordova-ios will remove all references of UIWebView from code. The page title. First responder error: non-key window attempting reload - allowing due to manual keyboard. Place the html file in your ~/Sites folder. To do so, create a WKWebView object, set it as the view, and send it a request to load web content. Mar 25, 2021 · In Swift, you can load HTML files into your WKWebView from a file that is part of your App Bundle. sharedinstancelet How to load a local HTML file into Ionic Web View in a Hybrid Cordova iOS app Problem When working on a Cordova Hybrid app (a cordova app wrapped in a thin layer of native UI) that uses Ionic Web View plugin as the WebView, there was a requirement from the client to have a native button that would load a local testing html file in the main WebView. You can pull and show content from a URL or a local HTML file, or you can Add unlimited file types that should trigger the built-in file downloader New optional fallback switch mode: Use local HTML folder if the user is offline, and use the remote URL if the user is online New language option: Append the user system language to the WebView URL Jan 08, 2018 · Step 2: Create an HTML File to Show the Chart. xml file and that plugin will automatically load the dependent cordova-plugin-alpha-wkwebview-engine plugin. It just works. The H5 code of our mall project is loaded when the app starts, and then the index. y. Dec 14, 2021 · wkwebview clear cache. Support for WKWebView. 10. Click the Load Html String button to display an Html file content in the WKWebView. 1, but we should have this as a contingency plan. apple. syncedDataDirectory ). The underlying component used to implement ui. 0, we now use WKWebView to implement Ti. 2 and later supports secure WKWebView for displaying interactive web content. html in the following way: class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { var webView: WKWebView! override func loadView () { webView = WKWebView () view = webView } override func I am stuck at one workflow that I am not able to load the local file ("file://") via iframe from the html file in WKWebview. Apache Cordova comes with a set of pre-developed plugins which provide access to the device’s camera, GPS, file system, etc. url(forResource: "my-html-file", withExtension: "html")! my-html-file – is the name of HTML file you want to load into WKWebView from your App Bundle. Dec 08, 2021 · A Flutter plugin that provides a WebView widget on Android and iOS. swift This file is to write the main view file, change it to the following Nov 15, 2018 · The problem was that the code was using a UIWebView instead of the newer WKWebView