Display web content in windows and implement browser features using WebKit.

WebKit Documentation

Posts under WebKit tag

283 Posts
Sort by:
Post not yet marked as solved
0 Replies
87 Views
We are injecting cookies using a nonPersistent() data store before creating the WKWebView (on completion). This works fine on prior versions (and I know Xcode 14 is in beta) but is no longer working in Xcode 14 / iOS 16 simulators and I see no posts, bugs raised or release notes for this so I'm raising it here to see if anyone else is experiencing this? I can see that the cookies are present in the WKHTTPCookieStore accessed via webView.configuration.websiteDataStore.httpCookieStore.getAllCookies. But both Safari debugging and our JS code embedded on the site can see no cookies.
Posted Last updated
.
Post not yet marked as solved
0 Replies
54 Views
In my iOS/iPadOS app I have notification content extension, which presents extended content using WKWebView. However, when started on lock screen (locked device), WKWebView does not load data properly. Therefore, I would like to ask user to unlock the device before displaying content. This is how Apple Mail does that - when selecting (long-pressing) notification banner on lock screen, it presents unlock screen (Passcode screen) before displaying content. Question: Do you know, how to do that? Is there any API to present unlock screen programmatically?
Posted
by kpuchar.
Last updated
.
Post not yet marked as solved
0 Replies
128 Views
Hi there, I'm interested in understanding how to solve the following scenario: having AppTrackingTransparency implemented, let's assume that the user has denied the app to track. At some point, the app presents the user a webpage (WKWebView), which provides additional functionalities to the app. How should the app inform the webpage that tracking must be disabled? Is there any way to force the WKWebView to disable tracking? I've read this post. So I know that redirecting the user to Safari, therefore outside of the app, is an alternative solution. And according to this answer on stack overflow doing something like self.webView.configuration.processPool.perform(Selector(("_setCookieAcceptPolicy:")), with: HTTPCookie.AcceptPolicy.never) is not allowed and the application will be rejected. Does anyone have any suggestions?
Posted
by mtgi.
Last updated
.
Post marked as solved
3 Replies
1.2k Views
Hi! Our app (blink.sh) has a browser integration focused on developers, and since latest changes now requires this entitlement to work properly. I have been trying to reach out over email (default-browser-requests at apple.com) more than five times since before Christmas with no response - not even a "case received" or "confirmation from Apple" which is very strange. I also reached out to "normal" developer relations through email and phone, and they took a deeper look at it. They told me that from information they got in this forum, the request may just take an "undetermined" amount of time, and that they could confirm we are using the right email. Unfortunately we have had to launch the new version of our application and limit some of the functionality, which is causing a stir of support issues from our side. Can anyone share what the process has been for them, and if they have received any confirmations along the way? Is there anyone here who could help us get in touch with the right person? Thanks!
Posted Last updated
.
Post not yet marked as solved
4 Replies
2.6k Views
On iOS 15 beta, when I tried to check my application, the select element is having issue. As when I clicked on select dropdown, the option list was not shown. The error message was "Failed to present a context menu for configuration with identifier".
Posted Last updated
.
Post not yet marked as solved
0 Replies
78 Views
Hi Team, We get some recurring crashes in Crashlytics titled "WebCore" and "UnoversalError.swift line2". We cannot find the exact cause. The event summary of most cases shows the iOS version as 15. Please find the attached screenshots for the same. Please help solve the problem here. Thanks in advance Regards, Mohamed Rafi
Posted Last updated
.
Post not yet marked as solved
0 Replies
71 Views
Hi, we are developing in hybrid app and our web developers would like to have some native component equivalent document for reference to create web pages. I found something for Android equivalent here and below https://material-components.github.io/material-web/demos/index.html I didn't find similar for iOS. Could you please share if you find any. Thanks in advance!
Posted
by suganraj.
Last updated
.
Post not yet marked as solved
0 Replies
119 Views
I am currently trying to create an IOS app that mirrors the one I have developed on Android. I am new to Swift, but had little trouble learning some of the basics. My app has a separate class that outputs html. I use the output html to be run using the loadHTMLString(html, baseURL) to display on the app. The user use pickers to select different parameters, but after selecting the parameters, the webView does not update the html. Using the print() method show that the new parameters get called. Here is the WKWebview struct, called Distance List import WebKit import SwiftUI struct DistanceList: UIViewRepresentable {      //Parameters for html String to update     var jump1type: String     var jump2type: String     //More parameters to come               //Create webview     var distanceList = WKWebView()        func makeUIView(context: Context) -> some WKWebView {         return distanceList     }          func updateUIView(_ uiView: UIViewType, context: Context) {         print("DistanceList.updateUIView(" + uiView.description + ", context) \njump1Type: " + jump1type)         //Invoke WKWebview extension method updateValues         distanceList.updateValues(jump1type: jump1type, jump2type: jump2type)     } } // - struct DistanceList: UIViewRepresentable extension WKWebView{     /**         * updates the HTML string and then calls it to be reloaded      */     func updateValues(jump1type: String, jump2type: String){         //Check that this method has been invoked correctly         print("DistanceList.udateValues("+jump1type+", " + jump2type + ") ")         //Creates a new HTML String from a static method in class Utils         let html: String = Utils.getDistance(jumpType1: jump1type, jumpType2: jump2type, lineType: "Jumping Round", horseType: "Horse", height1: 1.10, height2: 1.10, slope: "Flat")         //Load update html         loadHTMLString(html, baseURL: Bundle.main.resourceURL)         //Clean and clear cache         clean()     }          func clean() {             guard #available(iOS 9.0, *) else {return}             HTTPCookieStorage.shared.removeCookies(since: Date.distantPast)             WKWebsiteDataStore.default().fetchDataRecords(ofTypes: WKWebsiteDataStore.allWebsiteDataTypes()) { records in                 records.forEach { record in                     WKWebsiteDataStore.default().removeData(ofTypes: record.dataTypes, for: [record], completionHandler: {})                     #if DEBUG                         print("WKWebsiteDataStore record deleted:", record)                     #endif                 }             }     } } And here is the ContentView: import SwiftUI import UIKit import WebKit struct ContentView: View {          //Selection variables for Pickers     @State var jump1Selection = 0     @State var jump2Selection = 0     @State var useSelection = 0     @State var horseSizeSelection = 0     @State var height1Selection = 0     @State var height2Selection = 0     @State var slopeSelection = 0          //Arrays for Picker content     var jumps = [String](arrayLiteral: "Vertical", "Oxer", "Triple", "Wall", "Pole", "Cavalletti")     var uses = [String](arrayLiteral: "Jumping ", "Schooling Exercise", "From Trot")     var horseSizes = [String](arrayLiteral: "Horse", "Pony (large)", "Pony (medium)", "Pony (small)")     var jumpHeights = [String](arrayLiteral: "1.10m", "<0.50m", "0.60m", "0.70m", "0.80m", "0.90m", "1.00m", "1.10m", "1.20m", "1.30m", "1.40m", "1.50m", ">1.50m")     var slopes = [String](arrayLiteral: "Flat", "Downhill", "Uphill")          var body: some View {             VStack{                     Text("Strides Distance Calculator")                     //Jump 1                     Picker(selection: self.$jump1Selection, label: Text("Jump 1")){                         ForEach(0 ..< self.jumps.count){ index in                             Text("\(self.jumps[index])").tag(index)                         }                     }                     //Jump 2                     Picker(selection: self.$jump2Selection, label: Text("Jump 2")){                         ForEach(0 ..< self.jumps.count){ index in                             Text("\(self.jumps[index])").tag(index)                         }                     }                     //Line use                     Picker(selection: self.$useSelection, label: Text("Use")){                         ForEach(0 ..< self.uses.count){ index in                             Text("\(self.uses[index])").tag(index)                         }                     }                     //Horse size                     Picker(selection: self.$horseSizeSelection, label: Text("Horse Size")){                         ForEach(0 ..< self.horseSizes.count){ index in                             Text("\(self.horseSizes[index])").tag(index)                         }                     }                     //Fence 1 height                     Picker(selection: self.$height1Selection, label: Text("1st Fence Height")){                         ForEach(0 ..< self.jumpHeights.count){ index in                             Text("\(self.jumpHeights[index])").tag(index)                         }                     }                     //Fence 2 height                     Picker(selection: self.$height2Selection, label: Text("2nd Fence Selection")){                         ForEach(0 ..< self.jumpHeights.count){ index in                             Text("\(self.jumpHeights[index])").tag(index)                         }                     }                     //Ground slope                     Picker(selection: self.$slopeSelection, label: Text("Slope")){                         ForEach(0 ..< self.slopes.count){ index in                             Text("\(self.slopes[index])").tag(index)                         }                     }                 //Display webview                 //Only using two selections at present                 DistanceList(jump1type: self.jumps[self.jump1Selection], jump2type: self.jumps[self.jump2Selection])             }     } } struct ContentView_Previews: PreviewProvider {     static var previews: some View {         Group {                          ContentView()         }     } } When I run this app, the initial html String is loaded as it should, but the loadHTMLString method does not update to the new html String is loaded. After the second picker is loaded I get the following error code: i022-06-25 09:07:23.333657+1200 Strides Distance Calculator[23957:1326393] [ProcessSuspension] 0x10f005e60 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=23972, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" Can someone let me know what I am missing or where I am going wrong?
Posted
by Edward168.
Last updated
.
Post not yet marked as solved
1 Replies
394 Views
I have had this issue since the first Big Sur beta and with every update since. I used Apple's Feedback Assistant since I had this issue. Try it yourself - type in any browser on your computer any website that uses .app as its top-level domain (TLD) - get dot app or mmhmm dot app. Here is my Feedback Assistant issue number - FB8304994 and here is the text of it - Any and all .app top-level domains (TLDs) do not open in any browser windows. Try to open 3rd party website mmhmm.app or Google’s get.app (Google registry) and they will not open. When pinging them I get returned to 127.0.0.1 (localhost). Edited /etc/hosts file to add domain addresses and then the sites open. But this appears to be an issue of the OS and was not happening prior to the install of Big Sur OS. These domains are used for developers websites. I would really like to know if this will be fixed in the final release or sooner.
Posted
by rushter.
Last updated
.
Post not yet marked as solved
81 Replies
65k Views
Hi,Progressive Web Apps is a trend in 2019 and web push notifications for iOS are not supported right now.Do you have a date for the web push support?Thanks
Posted Last updated
.
Post not yet marked as solved
0 Replies
67 Views
Anyone having this crash, I believe it is cause by a website playing a video as soon as it is launched in the WKWebView, but I have not bee able to replicate the issue to even attempt to try and fix it yet.
Posted
by brianuc.
Last updated
.
Post not yet marked as solved
2 Replies
1k Views
Hi Guy's,insteadI hope Apple developers also reading this articles, because the functionality of Safari development for Mac OS and iOS is strongly recomended to be changed.First at all I have working on simple site with css styles and html with small additions of Java and see next bug's (or features) provided by apple team.When I'm using safari 13 Develop console and set up ignore cache feature in Network tab is working for all content (html, fonts etc.) instead css stylesheets files. Css content still got by safari from memory and this is ver stupid idea. Always when I need to see my changes I have clean all cached data from all sites using Cmd + Option + R key combination. This method is unusable.More from this - I have connect iPhone with last iOS and mobile Safari version and do the same. Previous version has clean mobile safari cache when I do this action. Buit new version of Development console cleans only Mac Cache data not mobile cache. So, to check the site new look I need clean all mobile saved data included cache, cookies and other saved using my Safari on mobile device.I can't explain who has develop this, but he should be fired and strongly disabled from availiablity to work in IT for all his life. I really hope the solution is found by this community and I'll be grateful to see answers with solution in this thread. Thanks a lot,Alexander.
Posted
by gromush.
Last updated
.
Post not yet marked as solved
2 Replies
1.2k Views
Hi. We have a mobile app with thousands of users. To integrate the app with our company's software, we have an iframe which points to the company's website url. Because of IOS 14's intelligent tracking prevention, the commucation stopped working. We were able to sove this issue by adding a string to xCode, which activates the "Prevent cross site tracking" option in the app's settings. We understand that this is a security measure, but it breaks existing funcionalities. Telling all users to disable that option feels unprofessional. It would be nice if we could disable it through a new string in xcode, or at least request user permission, if he chooses Yes, then it is disabled. I believe this a WKWebkit problem, let me know If Im wrong. Thank you!
Posted
by fabio_k.
Last updated
.
Post not yet marked as solved
2 Replies
761 Views
How to disable "Prevent cross site tracking" in WKwebview for Mac app. "NSCrossWebsiteTrackingUsageDescription" key in info.plist doesn't seem to work. Also, no cookies received in decidePolicyForNavigationResponse delegate method of WKwebview. Though can see in network traces. Does WKwebview blocks 3rd party cookies.
Posted
by shwetam.
Last updated
.
Post not yet marked as solved
0 Replies
145 Views
I have an idea of an app that I need to enquire about its acceptance in the Apple app store. The idea of the app is I am a middle man between the customer and the store, the app will have multiple online stores, the stores will be presented in the app as webview (Using WKWebView) of their websites then the app will identify the products on the website so the customer can add the product in the app's cart, after that the customer will submit the order inside the app. I'm building the app because in my country Yemen does not have online stores and the closest way is by ordering from online stores in the neighbor countries but these stores don't deliver to Yemen so I am acting as the middleman to deliver to Yemen .
Posted Last updated
.
Post not yet marked as solved
11 Replies
8.2k Views
webkitEnterFullScreen API is supported on iOS for video element, but not for a div element. Also as a fullscreen demo website shown, Safari on macOS supports div element but not on iOS. Is there any plan to add the support in iOS? If not is there any way to fullscreen a div element or make it run as fullscreen on Safari iOS?
Posted
by chen209.
Last updated
.
Post not yet marked as solved
19 Replies
15k Views
Every now and then I need to make a website. And I noted in my last project that background-attachment:fixed; is still not supported by iOS. It is by Safari on MacBooks, so I'm wondering what the story behind it is? Surely it is not a matter of computational cost due to the so-called repainting of the browser's canvas? Because doesn't playing video cost a multitude of that?
Posted Last updated
.