Explore WKWebView additions

RSS for tag

Discuss the WWDC21 session Explore WKWebView additions.

View Session

Posts under wwdc21-10032 tag

68 Posts
Sort by:
Post not yet marked as solved
1 Replies
436 Views
WKWebView and WebAuthn seems broken in iOS 15.4. Did something change, are they broken? To explain in more detail, when attempting to use a WebAuthn enabled web application in previous versions of iOS, the browser (WKWebView) reports "Not Supported". Trying the same in iOS 15.4, both simulator and device does not report "Not supported" and attempting a WebAuthn challenge gets stuck. Additionally, it seems not respect timeout times. An easy example is to run a simple test app with a WebView, load "https://webauthn.io/" and see the results. (See attachments). This has been tested in more vendors as well with similar results. I am posting here some results from webauthn.io that clearly demonstrate the behaviour change without any other moving parts. This causes multiple authentication issues on some 3rd party apps, when the authentication journeys include WebAuthn challenges. Is there a bug in WKWebViews, is that intended and if so how is someone supposed to get around that? Please let me know if you need code samples or for me to raise a bug report. Thanks in advance, George Bafaloukas
Posted Last updated
.
Post not yet marked as solved
0 Replies
267 Views
Im getting the below error with my webview. WKWebview loads a webpage and goes to payment page but the call back from payment page doesnot work. The app shows a balnk page and gives this error.Any body fixed this error ? [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}> 2022-05-16 22:56:14.883387+0200 Buydeal[56073:4625324] [ProcessSuspension] 0x1150b0de0 - ProcessAssertion: Failed to acquire RBS assertion 'WebProcess Background Assertion' for process with PID=56079, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
Posted
by GGuna.
Last updated
.
Post not yet marked as solved
0 Replies
152 Views
hi everyone, is there anyone meet same problem with me? if yes please tell me the solution plz is urgent. my situation is project created with webview by swift native Xcode and when i loaded success website that embedded scorm.js it will stuck in the middle of playing full content scorm , this issue happen in IOS 15.4 previous version don have this issue...
Posted Last updated
.
Post not yet marked as solved
0 Replies
341 Views
Hi I would like to ask if the webassembly technology is supported by wkwebview or if there are particular limitations. The second question is once an app has been developed where I have some sections inside that make use of web assembly modules, is it possible to publish them on the appstore or are there limitations? thanks for the replies.
Posted Last updated
.
Post not yet marked as solved
0 Replies
1.2k Views
Our iOS Application goes unResponsive, when loading embedded WebComponent in WKWebView , that renders on its internal HTML5 Canvas. The issues manifests in the following 2 scenarios, in iOS 15 and its subsequent releases ( such as 15.1, 15.4, and also in the latest 15.4.1 ). This issue was not seen in iOS Releases prior to 15 ( such as iOS 14.4 ) The App goes non-responsive, when we load at least 2 WKWebView, which call rendering on its HTML5 Canvas. The App is slow and goes non-responsive, when the orientation changes whilst the WKWebView is in the process of being rendered. When the App goes in this state, we see the following message in the debug console. `2022-04-25 16:43:29.304355+0530 LMAX ALL[32857:7260449] [Process] 0x1522f0600 - [PID=32865] WebProcessProxy::requestTermination: reason=7 2022-04-25 16:43:29.305302+0530 LMAX ALL[32857:7260449] [Process] 0x1522f0600 - [PID=32865] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=7 2022-04-25 16:43:29.310933+0530 LMAX ALL[32857:7260449] [Process] 0x7fcf4b05b220 - [pageProxyID=5, webPageID=6, PID=32865] WebPageProxy::processDidTerminate: (pid 32865), reason 7 2022-04-25 16:43:29.324730+0530 LMAX ALL[32857:7260449] [Loading] 0x7fcf4b05b220 - [pageProxyID=5, webPageID=6, PID=32865] WebPageProxy::dispatchProcessDidTerminate: reason=7 2022-04-25 16:43:29.345071+0530 LMAX ALL[32857:7263902] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}> 2022-04-25 16:43:29.345378+0530 LMAX ALL[32857:7263902] [ProcessSuspension] 0x1522fed20 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=32865, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit} 2022-04-25 16:43:29.375449+0530 LMAX ALL[32857:7263902] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}> 2022-04-25 16:43:29.375583+0530 LMAX ALL[32857:7263902] [ProcessSuspension] 0x1522fede0 - ProcessAssertion: Failed to acquire RBS assertion 'WebProcess Background Assertion' for process with PID=32865, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist} `
Posted Last updated
.
Post not yet marked as solved
0 Replies
144 Views
The Save Password / KeyChain dialogue is not presented upon entry of credentials in a wkWebView authorization view. While the domain is properly entitled and the KeyChain auto-fill does appear to FILL credentials that may already exist from Safari, the save user/password dialogue never displays on a change or if no prior credentials exist in Safari. Is this expected behavior? Clearly the entitlement of the domain allows the auto-fill to function properly.
Posted
by ArcadianZ.
Last updated
.
Post not yet marked as solved
1 Replies
445 Views
We have been searching for almost one year for answers as to why wkWebView using an Entitled Domain will allow Autofill with KeyChain to fill credentials, but will not trigger Autofill to store/save them. In other words, if users have previously stored credentials in Safari while visiting domain X, subsequent visited to wkWebView with entitled domain X will allow use of those credentials in wkWebView through the Autofill/Keychain dialogue. However, users cannot save/store credentials within wkWebView in Trusted domain X because the save dialogue is never triggered.
Posted
by ArcadianZ.
Last updated
.
Post not yet marked as solved
0 Replies
125 Views
I submitted a version of this question 3 years ago. There has not been an answer. 662 developers are watching that question. As requested by KMT I submitted a bug report. Others had submitted a similar bug report before me. As far as I can tell, nothing has been done to address this issue. Not addressing this issue amounts to disturbing negligence. This is important! WebView is flakey. It needs to be replaced. Apple Engineering: Please accept responsibility for this issue and respond with a date when we can expect a solution.
Posted Last updated
.
Post not yet marked as solved
0 Replies
191 Views
I'm currently working on a web view that takes a js plugin via .evaluateJavaScript(). The js script will read a cookie and send it along with requests to a url that is different from the url of the web view. I have this cookie in the URLSession.shared.configuration.httpCookieStorage, and initialized the webView with the default init() without passing any parameters. However, upon injecting the js, the required cookies does not appear in the webpage's storage (using safari inspector). I tried to do an output of the webView.configuration.websiteDataStore.httpCookieStore.getAllCookies(), and the result shows the specific cookie is there. Hence I'm confused about it. Anyone could help me with that would be greatly appreciated.
Posted
by GefeiShen.
Last updated
.
Post marked as solved
1 Replies
1.1k Views
In the session, regarding prompting user for camera or microphone permission, the delegate method shown in the code snippet is the following: func webView(_ webView: WKWebView, decideMediaCapturePermissionFor origin: WKSecurityOrigin, initiatedByFrame frame: WKFrameInfo, type: WKMediaCaptureType) async -> WKPermissionDecision { return type == .microphone ? .prompt : .deny } But, I couldn't find this method in the documentation. Instead, I found this: func webView(_ webView: WKWebView, requestMediaCapturePermissionFor origin: WKSecurityOrigin, initiatedByFrame frame: WKFrameInfo, type: WKMediaCaptureType, decisionHandler: @escaping (WKPermissionDecision) -> Void) Which one is the latest? Thanks!
Posted Last updated
.
Post not yet marked as solved
0 Replies
158 Views
Hi Support, We need your Help. For the selected functionality, we want to create Webview in our Mobile App . The rest of the functionality in our mobile app will be in Native swift. We want to know if the above method is acceptable to Apple? ie Will Apple Reject my Mobile APP from app store (either at the time of submission or few weeks/months later) because I used Webview in Mobile App? We tried to look for the answers in Apple ios help docs but we couldn't find any. We must know for sure if our app is following 100% Apple app store rules or not. The business impact of rejection of our app will be disastrous for us - financially and otherwise. Hence we want to get the direct response and confirmation from Apple Please provide a detailed and clear answer. Thanks Helios Advisory Team
Posted Last updated
.
Post not yet marked as solved
0 Replies
300 Views
Hi, We are planning to create a PWA application for iOS and android users for our functionalities. We have few queries, Kindly guide us Does apple support the PWA application submission in App Store ? Any limitation.. If we load the PWA URL in WKWebview in native app and generate native app, does apple allow this build to submit in store.. Any limitation . Thank you
Posted
by Finder-G.
Last updated
.
Post marked as solved
1 Replies
213 Views
Hello everyone I hope someone can help with my issue. We have a web application that we are using a ZStack to create a view in order to show the app within a swift application. The issue we are having is that when we interact with our application the bottom safe area expands and my team and I aren't sure how to fix this. This is the image before we interact with the application and this the same screen shot after we interact with one of the shown buttons. Any help will be appreciated.
Posted Last updated
.
Post not yet marked as solved
7 Replies
2k Views
First, thank you for adding getUserMedia to WKWebview. Now, I have a webrtc session with audio and video going both directions, problem is that when the app goes to background I can only hear the incoming audio on the iPhone side, but the mic audio is not being sent from the iPhone to the remote side. Using the new iOS 15 API I can see that wkwebview.microphoneCaptureState becomes muted shortly after applicationDidEnterBackground (using wkwebview.setMicrophoneCaptureState to active doesn't help when in the background either). I see this issue in iOS 15 beta 8 and also in iOS 14.7. If using the native mic capture with AVAudioSession then the mic continues to work in the background, so I background modes are good. Is there some config I can set to continue having the mic working in the background? Thank you
Posted Last updated
.
Post not yet marked as solved
0 Replies
309 Views
WebRTC audio call is not working in my in-app WKWebView , its working in safari browser , i am using above iOS 14.3 and Xcode 13 . I saw in one of apple webkit release that they are now supporting WebRTC in WKWebView above iOS 14.3. When I do in app call in WKWebView I gets, "Thank you for calling! unfortunately, Apple only supports calling in safari on iOS, please copy and paste the URL in safari" I checked by downloading one working video streaming sample app which is having Cordova to run HTML for permissions like microphone and camera and using one adapter.js file which I compared with my app implemented adapter.js file ,both was having same code . So the video stream is woking in that downloaded sample code but audio call is not working on my in app browser. requesting to give comments on this ,I have release and I am stuck here .
Posted Last updated
.
Post not yet marked as solved
0 Replies
175 Views
I have a swift 5 iOS native app in which I'm trying to add a web view to display another part of our project which is written in Meteor 2.5.3 as a web app. I have the web view up and running but it only shows the loading screen and never moves to the OAuth or the login screen of our Meteor web app. I assume this is because Meteor uses "Data on the wire" (I think this is just a web-socket) to deliver data to be rendered by the client. Is there a way I can listen to the data coming from Meteor to get my web-view to display and function properly?
Posted
by dylhof.
Last updated
.
Post not yet marked as solved
0 Replies
194 Views
I am using GSPlayer for playing video in background screen and I also have to play YouTube video in a view but YouTube video gets amused in each second, if any one can please solve my problem it would be pleasure,
Posted
by Seham_H.
Last updated
.
Post not yet marked as solved
0 Replies
378 Views
I have a web app that loads images from a zip file, and displays them successively. The zip file can store many images. To prevent from running out of memory, the memory is managed, by cleaning the memory from previous images before showing the next image. This is done by: setting the buffer to null. revoking the object url and setting the url to null. This approach works well on various OSs such as Windows, Linux, and MacOS. But on iOS it fails. In the example, a set of images from a zip file is displayed in a loop, to mimic a zip file with many images. Setting the variable doDebugMemoryLeakOn_iOS_withRevoke to true, activates the code URL.revokeObjectURL(fileInfo.url); which causes the problem, after some time (after ~1100 images on my iPad Pro). The problem can be seen by running the program and selecting the zip file: https://cdn.jsdelivr.net/gh/avnermosh/example8_memoryLeakOn_iOS/example8_take2_3images.zip (or any other zip file with several jpeg images - the linked zip file simply contains 3 images in size of 4032x3024) At some point, the program fails with an error message: "The I/O read operation failed" This happens on various iOS devices (e.g. iPad, iPhone8) with various iOS versions (iOS 15.2, iOS 14.8.1) when played in various browsers (e.g. Safari, Chrome, Firefox) after about 1000 images. It also happens in a native iOS app that uses WKWebView. I suspect that there may be a problem with the WKWebView browser engine, which is common to all these browsers. Note: several places commented on adjusting the Safari settings e.g. GPU Process: Canvas Rendering This somewhat deferred the problem but at some point the error still occurs. After the problem occurs, there is no way to recover programatically, e.g. by retrying to read the zip file entry or skipping to the next zip entry. The only solution is to select the file again. Could this indicate a bug in WKWebView? How can this be fixed, or worked around? Thanks p.s. I also placed the question on stackoverflow that describes the problem in details and shows a link to the online example that demonstrates the problem.
Posted
by avnerm.
Last updated
.
Post marked as solved
1 Replies
1.2k Views
We're using webview in our iOS app to show the web page. The website contains cookies and they need to be Accepted/Declined by the users by clicking on Accept or Decline button, Which is handled by the website. Apple asked us to either remove the cookies from web content or implement App Tracking Transparency. We added App Tracking Transparency and now the user is asked to allow or deny the tracking permission once the user allows then we show the cookie prompt in the webview and if they deny the permission we don't show the cookie prompt. To achieve this we've set one cookie when the user denies the permission - so that the cookie popup isn't shown. But our app still got rejected, below is the message by the apple review team - We noticed you collect data to track after the user selects "Ask App Not to Track" on the App Tracking Transparency permission request. Specifically, we noticed your app accesses web content you own and collects cookies for tracking after the user asked you not to track them. Next Steps To resolve this issue, please revise your app so that you do not collect data for tracking purposes if the user does not give permission for tracking. Resources Tracking is linking data collected from your app with third-party data for advertising purposes or sharing the collected data with a data broker. Learn more about tracking. See Frequently Asked Questions about the new requirements for apps that track users. Any help will be appreciated. Thanks in advance.
Posted Last updated
.