Explore WKWebView additions

RSS for tag

Discuss the WWDC21 session Explore WKWebView additions.

Posts under wwdc21-10032 tag

66 Posts

Post

Replies

Boosts

Views

Activity

IOS 13 webview keyboard messes up with webview display
I am displaying this contact form inside my webview but when I click on the bottom most text area it focuses on it and moves the point of view into the center ( I think this is a normal / desirable behavior ) But after the keyboard hides it remains like that thus creating a white space on the bottom part and It will get stuck into this state unless I click the top most input text. I checked this behavior on IOS 14 and it seems like it got fixed. But I am just wondering how to get around this on IOS 13.
0
0
447
Sep ’21
How to enable Cross-Site tracking on WKWebView
I have an iOS webview app which require access to third party cookies accessed from inside an iFrame, even if I clear the Prevent Cross Site Tracking on IPhone Safari Settings, it does not work! But when I access the webview link directly using Safari (Desktop) and clear the Prevent Cross-Site Tracking, it works fine! I have been trying for over a week now, and no luck I have added NSCrossWebsiteTrackingUsageDescription to the info.plist on the iOS app and I can see the new settings for the app, but even if I allow cross-site tracking, still does not work! I have also added WKAppBoundDomains to the info.plist as an array with different combination as below: thirdparty.com, *.thirdparty.com, a.thirdparty.com, a.b.thirdparty.com with no luck either! I have been searching SO, Apple Forum and webkit for many days, seems some people have it working but i have no clue how did they get it to work as there were no clear solutions? I am not sure why Safari (Desktop) behaves in a different manner to Safari (Mobile)! I have tried on simulator and an iphone device, cleared all data and website cookies, still not working. If you have successfully implemented WkAppBoundDomains or NSCrossWebsiteTrackingUsageDescription, please share your solution as I am out of ideas. Your time is greatly appreciated Xcode: 12, iOS: 14
0
0
1.4k
Sep ’21
WKWebView keyboard suggestions not showing for email field.
WKWebView keyboard suggestions not showing for email field/username field. We tried the autocomplete attribute - ‘username’ in the HTML page content.  The HTML page has the following code for the above - input id="user-text-field" type="email" autocomplete="username We are currently using iPhone7 with iOS version 14.4, and iPhone X with 14.5 iOS version. Any help would be greatly appreciated. Thank you
0
0
607
Sep ’21
Microphone access - WKBWebview
For iOS 14.3 apple announced WebRTC support for WKWebViews. For iOS 15, extension in such support was announced. I have loaded a WebView in both, iOS 14.5 and iOS 15 and observed different behaviors. Things do not work for either iOS. My website, requires access to the microphone. When I load it for iOS 14.5, and click on the microphone, the app crashes with a memory exception (Malloc) for webkit userPermissionRequestProxy. When I use iOS 15, no error or crash occurs, yet the microphone is not working. I have updated the info.plist file to allow permissions I am giving access to AVAudioSession. Is there anything else I need to do?
0
0
741
Sep ’21
WKWebView + ReactJS + HTTP Request issues
Hi there, I am currently working on a small MacOS status bar app that involves running a local ReactJS app within a WKWebView. For the most part communication between Swift and React is accomplished via evaluateJavaScript / userContentController handler/listeners, but in some instances, I am using fetch GET/POST requests within the React app to retrieve data from an API I am serving elsewhere. The problem I am running into is when I make an HTTP GET request within the React app to retrieve some data from my server, I can see it reaching the endpoint, however the response in React is never fulfilled. When testing this in React alone in a web browser it works fine, which leads me to believe this is a security issue with WKWebView or a greater extent the app. I've tried numerous NSAppTransport settings to no avail. Any thoughts on this issue would be greatly appreciated.
0
0
580
Sep ’21
Getting error “Could not create sandbox extension” while loading Webview on Flutter iOS.
I am trying to load HTML along with JavaScript file from the assets folder using "webview_flutter" plugin. On the webview loading page I am getting this error I have also added "NSAppTransportSecurity" permissions to the Info.plist file and changed the iOS deployment target version to 11.0, 12.0. But still not working any solution.
0
0
544
Aug ’21
IOS 13 webview keyboard messes up with webview display
I am displaying this contact form inside my webview but when I click on the bottom most text area it focuses on it and moves the point of view into the center ( I think this is a normal / desirable behavior ) But after the keyboard hides it remains like that thus creating a white space on the bottom part and It will get stuck into this state unless I click the top most input text. I checked this behavior on IOS 14 and it seems like it got fixed. But I am just wondering how to get around this on IOS 13.
Replies
0
Boosts
0
Views
447
Activity
Sep ’21
How to enable Cross-Site tracking on WKWebView
I have an iOS webview app which require access to third party cookies accessed from inside an iFrame, even if I clear the Prevent Cross Site Tracking on IPhone Safari Settings, it does not work! But when I access the webview link directly using Safari (Desktop) and clear the Prevent Cross-Site Tracking, it works fine! I have been trying for over a week now, and no luck I have added NSCrossWebsiteTrackingUsageDescription to the info.plist on the iOS app and I can see the new settings for the app, but even if I allow cross-site tracking, still does not work! I have also added WKAppBoundDomains to the info.plist as an array with different combination as below: thirdparty.com, *.thirdparty.com, a.thirdparty.com, a.b.thirdparty.com with no luck either! I have been searching SO, Apple Forum and webkit for many days, seems some people have it working but i have no clue how did they get it to work as there were no clear solutions? I am not sure why Safari (Desktop) behaves in a different manner to Safari (Mobile)! I have tried on simulator and an iphone device, cleared all data and website cookies, still not working. If you have successfully implemented WkAppBoundDomains or NSCrossWebsiteTrackingUsageDescription, please share your solution as I am out of ideas. Your time is greatly appreciated Xcode: 12, iOS: 14
Replies
0
Boosts
0
Views
1.4k
Activity
Sep ’21
WKWebView keyboard suggestions not showing for email field.
WKWebView keyboard suggestions not showing for email field/username field. We tried the autocomplete attribute - ‘username’ in the HTML page content.  The HTML page has the following code for the above - input id="user-text-field" type="email" autocomplete="username We are currently using iPhone7 with iOS version 14.4, and iPhone X with 14.5 iOS version. Any help would be greatly appreciated. Thank you
Replies
0
Boosts
0
Views
607
Activity
Sep ’21
Microphone access - WKBWebview
For iOS 14.3 apple announced WebRTC support for WKWebViews. For iOS 15, extension in such support was announced. I have loaded a WebView in both, iOS 14.5 and iOS 15 and observed different behaviors. Things do not work for either iOS. My website, requires access to the microphone. When I load it for iOS 14.5, and click on the microphone, the app crashes with a memory exception (Malloc) for webkit userPermissionRequestProxy. When I use iOS 15, no error or crash occurs, yet the microphone is not working. I have updated the info.plist file to allow permissions I am giving access to AVAudioSession. Is there anything else I need to do?
Replies
0
Boosts
0
Views
741
Activity
Sep ’21
WKWebView + ReactJS + HTTP Request issues
Hi there, I am currently working on a small MacOS status bar app that involves running a local ReactJS app within a WKWebView. For the most part communication between Swift and React is accomplished via evaluateJavaScript / userContentController handler/listeners, but in some instances, I am using fetch GET/POST requests within the React app to retrieve data from an API I am serving elsewhere. The problem I am running into is when I make an HTTP GET request within the React app to retrieve some data from my server, I can see it reaching the endpoint, however the response in React is never fulfilled. When testing this in React alone in a web browser it works fine, which leads me to believe this is a security issue with WKWebView or a greater extent the app. I've tried numerous NSAppTransport settings to no avail. Any thoughts on this issue would be greatly appreciated.
Replies
0
Boosts
0
Views
580
Activity
Sep ’21
Getting error “Could not create sandbox extension” while loading Webview on Flutter iOS.
I am trying to load HTML along with JavaScript file from the assets folder using "webview_flutter" plugin. On the webview loading page I am getting this error I have also added "NSAppTransportSecurity" permissions to the Info.plist file and changed the iOS deployment target version to 11.0, 12.0. But still not working any solution.
Replies
0
Boosts
0
Views
544
Activity
Aug ’21