Explore the integration of web technologies within your app. Discuss building web-based apps, leveraging Safari functionalities, and integrating with web services.

All subtopics

Post

Replies

Boosts

Views

Activity

[crash] iOS 18 _os_unfair_lock_recursive_abort
crash log: _os_unfair_lock_recursive_abort SIGTRAP BACKGROUND THREAD 29 - CRASHED libsystem_platform.dylib _os_unfair_lock_recursive_abort libsystem_platform.dylib _os_unfair_lock_lock_slow WebKit void IPC::Connection::dispatchToClient<IPC::Connection::enqueueIncomingMessage(***::UniqueRefIPC::Decoder)::$_0>(IPC::Connection::enqueueIncomingMessage(***::UniqueRefIPC::Decoder)::$_0&&) WebKit IPC::Connection::enqueueIncomingMessage(***::UniqueRefIPC::Decoder) WebKit IPC::Connection::processIncomingMessage(***::UniqueRefIPC::Decoder) WebKit ___ZN3IPC10Connection12platformOpenEv_block_invoke libdispatch.dylib _dispatch_client_callout libdispatch.dylib _dispatch_continuation_pop libdispatch.dylib _dispatch_source_latch_and_call libdispatch.dylib _dispatch_source_invoke libdispatch.dylib _dispatch_lane_serial_drain libdispatch.dylib _dispatch_lane_invoke libdispatch.dylib _dispatch_root_queue_drain_deferred_wlh libdispatch.dylib _dispatch_workloop_worker_thread libsystem_pthread.dylib _pthread_wqthread libsystem_pthread.dylib start_wqthread Collapse Note: only crash above iOS 18.0
1
0
179
Oct ’24
2016 MacBook Pro popping sounds
I got a second-hand have MacBook Pro and sometimes when I run apps the Mac will start popping every 10-30 minutes. I'm not sure if this is something that happens normally because this is an intel MacBook. If someone knows the answer to my question then please respond Thanks!
1
0
170
Oct ’24
WKWebView intercepting Https URL
I'm developing an application that utilizes WKWebView to display a webpage. My goal is to improve the performance and loading speed of this webpage by intercepting specific API calls and providing pre-stored JSON responses directly from within the app, ensuring the webpage renders instantaneously. The challenge I am encountering is the inability to intercept HTTPS URL schemes directly from WKWebView. Any insights or solutions from the community on how to effectively manage and overwrite these particular network requests would be greatly appreciated.
1
0
266
Oct ’24
After building in Xcode, my extension is not showing in Safari.
Hi, I had been working on an extension without any issues, running it from Xcode and debugging locally in Safari. However, without making any code changes, and after uninstalling the extension, it stopped appearing in Safari after building for local debugging. Does anyone know what might be happening or how I can clean up the system? Thanks a lot and best regards.
5
0
374
Oct ’24
declarativeNetRequest.getMatchedRules() does not return the blocked URLs of the current website until refreshed
We used declarativeNetRequest.getMatchedRules() to retrieve the blocked URLs. While we do receive a list, we noticed that the URLs captured do not always reflect the ones the content blocker is actively blocking at that moment. However, upon reloading the same page, the correct URLs appear. Screenshots are attached for your reference. First load: After reload:
2
0
332
Oct ’24
WKWebView gpuProcessExited IdleExit Code=18
I'm injecting some javascript into a WKWebview on iOS. At a certain point the web view spits out these warnings into the console and the javascript execution stops. 0x109018c40 - [PID=778] WebProcessProxy::gpuProcessExited: reason=IdleExit 0x109019200 - [PID=779] WebProcessProxy::gpuProcessExited: reason=IdleExit Failed to terminate process: Error Domain=com.apple.extensionKit.errorDomain Code=18 "(null)" UserInfo={NSUnderlyingError=0x303c3c060 {Error Domain=RBSRequestErrorDomain Code=3 "No such process found" UserInfo={NSLocalizedFailureReason=No such process found}}} I can't find any solution for this so am looking if anyone has any idea of what to try. None of the WKWebview delegate functions trigger when this occurs so I can't attempt to reload the webview at this stage
0
0
422
Oct ’24
iOS 18.0.1 - SafariViewService - LIBXPC - XPC_EXIT_REASON_FAULT
Title: SafariViewService Recurring "Hard Refresh" Issue on iOS 18.0.1 Hello, Many of my app users are experiencing a recurring "hard refresh" issue related to SafariViewService, which appears only on iOS 18.0.1 across various iPhone models. Users on earlier iOS versions are not encountering this problem. Our app relies on SafariViewService, and the logs show an event triggered by an EXC_GUARD exception with a termination reason from LIBXPC, causing the app to stop. Below are key details from the log report: App Version: 4.1.2 (build 4.1.1.0) OS Version: iPhone OS 18.0.1 Exception Type: EXC_GUARD Subtype: GUARD_TYPE_USER Termination Reason: LIBXPC, XPC_EXIT_REASON_FAULT Device Model: iPhone 11 Pro Max Process Path: [Removed] Here’s an excerpt from the logs: ... {"codes":"0x6000000000000007, 0x0000000000000009","reason":9,"message":"namespc 7 reason_code 0x0000000000000009","subtype":"GUARD_TYPE_USER","type":"EXC_GUARD","rawCodes":[Removed],"namespc":7}, "termination" : {"flags":518,"code":9,"namespace":"LIBXPC","indicator":"XPC_EXIT_REASON_FAULT"}, ... I would greatly appreciate any guidance on resolving this issue, particularly if there are known concerns with inter-process communication (LIBXPC) in iOS 18.0.1 or advice on how to manage the EXC_GUARD exception more effectively. Full log details are in the attachment. Thank you for your help! ExcUserFault_SafariViewService-2024-10-10-102717 (1).ips ExcUserFault_OnixWorker.Maui-2024-10-10-102718 (1).ips Thank you for your help!
0
8
553
Oct ’24
Unable to Launch Safari Driver
I am encountering an issue where we are unable to run or launch Safari Driver in our automation tests using macOS. When attempting to run safaridriver -p 8888 from the terminal, we receive the following error message: ERROR: safaridriver could not launch because it is not configured correctly or you need to authenticate. Re-run safaridriver(1) and pass the '--enable' flag to configure and/or authenticate. For more information, consult the safaridriver(1) man page. Despite running sudo safaridriver --enable as an administrator (even as root), the issue persists. I’ve searched through various online forums and GitHub repositories but couldn’t find a working solution. Some references are: Apple Developer Forum Thread: https://forums.developer.apple.com/forums/thread/762321 GitHub Issue: https://github.com/SeleniumHQ/selenium/issues/11381
2
0
190
Oct ’24
CSS not displaying when using WKURLSchemeHandler on iOS 17+ with Xcode 15.3+
I’m encountering an issue with CSS not displaying when using WKURLSchemeHandler to load local HTML files. • When I package the app using Xcode 15.3 or above, the CSS styles do not display on iOS 17 or higher. However, on iOS 16.7.1, the CSS displays correctly. • If I use Xcode 15.2 to package the app, the CSS loads and displays correctly on all iOS versions. I am using WKURLSchemeHandler to intercept and load the local HTML files. Is there any known issue or workaround for this? You can now post this in the “Safari & Web” section of the Apple Developer forums for further assistance! // // CustomURLSchemeHandler.m // HTMLTest // // Created by lvxue on 2024/9/23. // // CustomURLSchemeHandler.m #import "CustomURLSchemeHandler.h" @implementation CustomURLSchemeHandler // 拦截请求并提供本地 HTML 文件 - (void)webView:(WKWebView *)webView startURLSchemeTask:(id<WKURLSchemeTask>)urlSchemeTask { NSURL *url = urlSchemeTask.request.URL; //NSString *filePath; // 获取本地 HTML 文件路径 NSString *filePath = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:@"LoaclHtml.bundle/A4"]; // 判断请求的是 HTML、CSS 或其他文件 if ([url.lastPathComponent hasSuffix:@".css"]) { filePath = [[NSBundle mainBundle] pathForResource:@"style" ofType:@"css" inDirectory:@"LoaclHtml.bundle/A4/css"]; } else if ([url.lastPathComponent hasSuffix:@".js"]) { filePath = [[NSBundle mainBundle] pathForResource:@"yourJSFileName" ofType:@"js" inDirectory:@"LoaclHtml.bundle/A4/js"]; } // 可以继续添加其他资源类型如图片 NSData *htmlData = [NSData dataWithContentsOfFile:filePath]; NSString *mimeType = [self mimeTypeForPath:filePath]; // 创建响应头 NSURLResponse *response = [[NSURLResponse alloc] initWithURL:url MIMEType:mimeType expectedContentLength:htmlData.length textEncodingName:@"utf-8"]; // 提供响应数据 [urlSchemeTask didReceiveResponse:response]; [urlSchemeTask didReceiveData:htmlData]; [urlSchemeTask didFinish]; } // 停止请求 - (void)webView:(WKWebView *)webView stopURLSchemeTask:(id<WKURLSchemeTask>)urlSchemeTask { // 通常不需要处理停止请求的逻辑 } - (NSString *)mimeTypeForPath:(NSString *)path { NSString *fileExtension = [path pathExtension]; if ([fileExtension isEqualToString:@"html"]) { return @"text/html"; } else if ([fileExtension isEqualToString:@"css"]) { return @"text/css"; } else if ([fileExtension isEqualToString:@"js"]) { return @"application/javascript"; } else if ([fileExtension isEqualToString:@"png"]) { return @"image/png"; } else if ([fileExtension isEqualToString:@"jpg"] || [fileExtension isEqualToString:@"jpeg"]) { return @"image/jpeg"; } else if ([fileExtension isEqualToString:@"gif"]) { return @"image/gif"; } return @"application/octet-stream"; } @end code-block
0
0
126
Oct ’24
tabs.executeScript ignores frameId option
As of Safari 18, the tabs.executeScript extension API no longer respects the frameId option passed to it, and instead just runs the script in the top frame. Try running an extension with the following contents on a page with an iFrame (chase.com puts its login form in an iFrame for example). content.js console.log("content.js loaded", location.href); // tabs.executeScript test browser.runtime.sendMessage({ type: "tabs.executeScript" }).then(() => { console.log("tabs.executeScript done"); }); // scripting.executeScript test browser.runtime.sendMessage({ type: "scripting.executeScript" }).then(() => { console.log("scripting.executeScript done"); }); background.js browser.runtime.onMessage.addListener((request, sender, sendResponse) => { if (request.type === "tabs.executeScript") { browser.tabs .executeScript(sender.tab.id, { code: 'console.log("THIS IS RUN FROM TABS.EXECUTESCRIPT", location.href);', frameId: sender.frameId, }) .then(sendResponse); } else if (request.type === "scripting.executeScript") { browser.scripting .executeScript({ target: { tabId: sender.tab.id, frameIds: [sender.frameId] }, func: () => { console.log("THIS IS RUN FROM SCRIPTING.EXECUTESCRIPT", location.href); }, }) .then(sendResponse); } }); You'll see that tabs.executeScript runs its contents in the TOP frame, no matter what the target is. Notably, scripting.executeScript DOES respect the frameId. Filed with Feedback ID FB15420092
1
0
232
Oct ’24
I am using WkWebview
I am trying to access a camera from web view and I'm unable to load the updated UI in web view and web view gets flick for every few seconds. The updated UI has some more functionality, but the web page not getting loaded.
0
0
186
Oct ’24
Error: Invalid call to runtime.connect(). No runtime.onConnect listeners found.
Hi, I am developing the Click & Read web add-on for Chromium, Firefox and Safari. We use xcrun safari-web-extension-converter tool to generate the Safari add-on. The build on Xcode had no meaning errors/warnings, until we had to switch to a more up-to-date MacBook (required as deprecated Mac had no support for latest macOS and thus for Xcode compatibility !). So now I build my add-on on an Apple M1 MB Air on Sequoia 15.0 with latest Xcode, but I encounter an error ? or warning ? : NSBundle file:///System/Library/PrivateFrameworks/MetalTools.framework/ principal class is nil because all fallbacks have failed Unable to create bundle at URL ((null)): normalized URL null Unable to create bundle at URL ((null)): normalized URL null Unable to create bundle at URL ((null)): normalized URL null But it doesn't prevent the add-on build to complete as I am able to open it onto Safari. Then, when loading the add-on on a test web page, I get this error on safari console: Error: Invalid call to runtime.connect(). No runtime.onConnect listeners found. BTW, the same add-on Dist works as expected on Chrome or Firefox (on macOS). So it seems the runtime listener runtime.onConnect.addListener isn't initiated on Background script... Thanks for your feedback and help
6
0
540
Sep ’24
Safari WKWebview local storage not being transferred to external Safari tab
Hi. I've noticed on both iOS 17 and iPadOS 16 that when an user opens a website in a WKWebview (e.g from Gmail), then requests it to be opened in the external Safari app (through the "compass" icon), their localStorage data is not transferred to the Safari tab. This behaviour breaks web experiences that rely on data being locally stored, e.g auth tokens or user identification data. It effectively stops users from being able to use some websites outside of an in-app context. I am aware of Webkit's tracking prevention mechanisms such as https://webkit.org/tracking-prevention/#partitioned-third-party-localstorage, but I don't think this should apply to this case. Here the user is navigating between two Safari tabs (one internal and one external) on the same domain, exact same URL, by pressing a native Safari webview icon. There is no third-party cross-domain tracking happening. Is this a bug or intended behaviour?
1
0
273
Oct ’24
Test Automation with Appium - Xcuitest - Safari pop up/ new window not getting identified
Hi, I am automating an ios AAP with Appium - 2.11.5 xcuitest - 7.1.0 ios - 17.5 I am working on a browser base application and a scenario where in a new pop up/new window is opened. So basically i have 2 windows now. Typically if print the window size at this point it should print me 2 windows. Not to worry for for context Native_app as i have a native app open in parallel. But when i print it shows me window length = 1. Window length ======= >>>> 1 [Ljava.lang.Object;@31add542 …WEBVIEW_97973.1 … curtent cotext WEBVIEW_97973.1 Context … NATIVE_APP Context … WEBVIEW_97973.1 You can clearly see here its only identifying 1 window. Parent window only - window length=1 My capabilities are set as follows capabilities.setCapability(“platformName”, IOS); capabilities.setCapability(“deviceName”, “iPhone 15 Pro”); capabilities.setCapability(“autoWebview”, TRUE_STRING); capabilities.setCapability(“autoAcceptAlerts”, true); capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, “XCUITest”); capabilities.setCapability(CapabilityType.BROWSER_NAME, “Safari”); capabilities.setCapability(“SFSafariViewController”, true); capabilities.setCapability(“appium:includeSafariInWebviews”, true); capabilities.setCapability(“safariAllowPopups”, true); capabilities.setCapability(“waitForIdleTimeout”, 0); capabilities.setCapability(“isInspectable”, true); capabilities.setCapability(“webviewConnectTimeout”, 5000); Kindly provide any pointers how to get read of this window issue. This is blocking automating all my flows in webflow. any help is much appreciated
1
0
187
Oct ’24
[MapkitJS] Uncaught TypeError: [MapKit] Expected a number for `x` in MapRect constructor but got `NaN` instead.
Hi, I'm building a nextjs app based on of MapkitJS. I tried to pass a new value to cameraZoomRange like the code below. As long as I put in this part map.cameraZoomRange, the error shows up. Not sure it's my fault, or the bug of MapkitJS. const map = new window.mapkit.Map(element, { colorScheme: mqMatchLightTheme ? window.mapkit.Map.ColorSchemes.Light : window.mapkit.Map.ColorSchemes.Dark, showsCompass: window.mapkit.FeatureVisibility.Hidden, showsMapTypeControl: false, showsZoomControl: false, showsUserLocation: true, tracksUserLocation: true, isRotationEnabled: true, isZoomEnabled: true, }); map.cameraZoomRange = new window.mapkit.CameraZoomRange({ minCameraDistance: 14, maxCameraDistance: Infinity, });
0
0
212
Oct ’24