Safari Developer Tools

RSS for tag

Inspect, edit, debug, and check the performance of your web content using Safari developer tools.

Posts under Safari Developer Tools tag

57 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

How to debug service worker/pwa in ios11.3 mobile device?
My environment: * Safari Technology Preview Release 51 (Safari 11.2, WebKit 13606.1.6) * iPad with ios11.3 (15e5216a) * mac os 10.13.3I can debug service worker in mac desktop.I can debug service worker in Android mobile device.But I could not found out how to debug service worker in ios11.3 mobile device?I wonder if it should belong to "Safari Developer Tools " or "iOS Web Apps"
4
1
6.1k
Jun ’23
SafariDriver click on a button not working with safari 13.0.1
I am using Selenium 3.141 with SafariDriver included with Safari 13.0.1 (14608.2.11.1.11).I have problems with interacting with elements, in this case clinking on a button.1) Create a new SafariDriver 2) Navigate to a page with a button element3) Find the button element4) Click on the button elementRESULT: The click is not performed on the button element but any element below the button element.This is not working from the recent update to safari 13.0.1.
10
0
5.8k
Jun ’23
Simulate Device On Safari
Hey Developers! I love web design and am trying to test out some CSS, I am currently using a MacBook Pro 13" (2020 Version), I only use Safari and I want to know if I'm able to simulate other devices like a Windows 10 PC, an Android phone, an iPhone, or an iPad. I do own an iPhone and iPad but wanted to do it all on my Mac, I've tried searching for Safari extensions to do this but so far I haven't found one. If you could give me some suggestions or a link to what I should use it would be appreciated. Thanks, Mateo
3
0
17k
Sep ’23
Browser.permissions.request not working as expected
Hi there - I am trying to port over Chrome extension over to Safari Web extension. Looks like Safari has a very aggressive permissions flow which isn't a great user experience but I get the privacy benefits. I am trying to move some of my permissions like <all_urls> or tabs as optional permissions and build a flow where I can request the user for them in hopes that i can educate them as to why I need them similar to how Chrome/FF have it. However when i use browser.permissions.request - i always end up getting true without invoking the prompt. The prompt seems to come up regardless when i start visiting a website. Can someone help with this? Sounds more like a defect in Safari.
2
0
1.1k
3w
iOS 16.4 ASWebAuthenticationSession's webview can not debug in safari web inspector
I'm using Xcode 14.2 to build an app that runs on iOS 16.4. There is no webView.isInspectable property in this version. When my app presents a webview, it is inspectable in Safari -> develop, which is nice. However, when starting a ASWebAuthenticationSession, Safari -> develop shows "no inspectable applications". It was inspectable on iOS 16.1 but not iOS 16.4. How to solve this?
5
2
1.7k
Sep ’23
Tomcat servlet HttpServletRequest not found
Is it because file cannot be opened because it is from an unidentified developer. I have a MacBook Air I have installed TomCat My application will be using servlets I can not get the simplest servlet to compile and execute. I downloaded javax and was not sure where to put it. Thought it should go into Library/Java/Extensions I suspect that Mac will not allow opening the file When is compile in terminal stephenghebert@Stephens-MacBook-Air myapp % javac HelloWorld.java HelloWorld.java:10: error: cannot find symbol public class HelloWorld extends HttpServlet { ^ symbol: class HttpServlet HelloWorld.java:11: error: cannot find symbol public void doGet(HttpServletRequest request,
0
0
515
Jun ’23
Useful WWDC Videos Missing from Previous Years (For example: "Customized Loading in WKWebView from WWDC 2017")
It appears a lot of useful WWDC session videos from previous years have been scrubbed from the developer.apple.com? I cannot find the WWDC session "Customized Loading in WKWebView" from 2017 in the Developer app nor on the developer website. There are lots of other videos that would be useful to watch, even from years ago. Am I just not looking in the right place?
0
0
406
Jul ’23
Cookies in SFSafariviewcontroller
I am using appauth pods for authentication (https://github.com/openid/AppAuth-iOS) and was wondering how Safari webkit is managing the application context for the cookies saved while authentication. I made sure I have a successful authentication then I tried few combinations to understand failed authentication behavior and tried to compare with my mac safari developer tools. What caught me off guard was that the safari webkit cookies were not visible to me programmatically. I am using below code to get the cookies. HTTPCookieStorage.shared.cookies(for: URL(string: "https://(targetDomain)")!) I also tried using developer console for mobile safari kit but as soon as the authentication flow gets completed the view is destroyed and information gets lost. So has anyone have come across this situation and figured how safari web kit isolates the cookies visibility.
0
0
934
Jul ’23
SFSafariViewController not showing location permission pop-up but showing camera permission pop-up
Hey, I am loading a link on my app using SFSafariViewController and that link asking camera and location permission. Camera permission pop-up showing and accessible but for location permission it is not doing anything even not showing location permission pop-up. I need to know is there any way to get location permission pop-up on SFSafariViewController.
1
0
906
Jul ’23
Using file:// scheme to access local files on SafariForWebKitDevelopment
I am currently utilizing local servers to facilitate interactions with local resources. However, I am exploring if there are solutions that would enable direct file access through the file:// protocol. I cannot access the developer tools and feature flags. Specifically, the option "Show features for web developers" seems to be deactivated. This is happening within the ASan WebKit build. I am running this using Tools/Scripts/run-safari. Any insights or potential solutions to these issues would be greatly appreciated.
2
1
571
Jul ’23
Passwordless single sign on using SFSafariViewController in swift
0 I integrate with safriService (SFSafariViewController) to log in through a single sign-on password, the problem was the first time I log in using SFSafariViewController but the authentication follow not complete the first time so the safari browser still appear & can not direct into my app after authentication follow to become a success, another behavior is when I login again the authentication follow work fine & get the token then directed into my app fine so the main problem is the first time I login SFSafariViewController does not catch the user auth if let url = URL(string: "url") { let safariVC = SFSafariViewController(url: url) safariVC.delegate = self safariVC.dismissButtonStyle = .done present(safariVC, animated: true, completion: nil) } extension DouWebViewVC: SFSafariViewControllerDelegate { func safariViewController(_ controller: SFSafariViewController, didCompleteInitialLoad didLoadSuccessfully: Bool) { if didLoadSuccessfully { print("didLoadSuccessfully") // Do something with the URL here } } //initialLoadDidRedirectTo func safariViewController(_ controller: SFSafariViewController, initialLoadDidRedirectTo requestUrl: URL) { let absoluteUrl = requestUrl.absoluteString print("requestUrl(requestUrl)") } func safariViewControllerDidFinish(_ controller: SFSafariViewController) { print("safariViewControllerDidFinish") } }
0
0
572
Aug ’23
SessionNotCreatedError: Could not create a session: Some devices were found, but could not be used:
I am trying to automate Web app on iOS Safari for e2e test. Even though following code worked for emulator in iOS 17 beta, it seems not working on Real Device(iPhone 12, iOS 16.6). code for test describe("test0", () => { const getDriver = async () => { const options = new safari.Options() const capabilities = webdriver.Capabilities.safari() capabilities.setPlatform('ios') capabilities.set('safari:deviceType', 'iphone') capabilities.set('safari:useSimulator', false) const driver = new Builder().forBrowser('safari').withCapabilities(capabilities).setSafariOptions(options).build() return driver } let driver beforeAll(async () => { driver = await getDriver() }, 10000000) afterAll(async () => { await driver.quit(); }); test("test", async () => { await driver.get("https://google.com"); }, 1000000); }); Following error will happen when testing through real device while device is listed on Device and Simulators opened by Xcode > Window > Device and Simulators. SessionNotCreatedError: Could not create a session: Some devices were found, but could not be used: - iPhone (***-xxxxxxx): Remote Automation is turned off (turn it on via Settings > Safari > Advanced > Remote Automation) - [unknown wireless device]: device is not paired at Object.throwDecodedError (../node_modules/selenium-webdriver/lib/error.js:524:15) at parseHttpResponse (../node_modules/selenium-webdriver/lib/http.js:601:13) at Executor.execute (../node_modules/selenium-webdriver/lib/http.js:529:28) What I tried I turned on Safari > Advanced > Web Inspector, Safari > Advanced > Remote Automation, Developper > Enable UI Automation on iOS setting. I enabled safaridriver running safaridriver --enable. Versions XCode: 15.0 beta iOS: 17 beta
0
0
521
Aug ’23
iOS 17.0 Webkit 'display:flex' issue
When rendering 2 'div' components with 'display:flex' placed on top of each other, the preceding one sometimes comes up. The 'position:absolute' has been set and the second 'div' component is being generated after the first one. However, when inspecting the iOS webview in Safari, I enable-disable the 'display:flex' property, everything starts working again. This is possibly a bug in the layout engine. I tried the same process in iOS 16.4 and there are no issues at all.
3
0
1k
Sep ’23