Safari Developer Tools

RSS for tag

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

Safari Developer Tools Documentation

Posts under Safari Developer Tools tag

99 Posts
Sort by:
Post not yet marked as solved
1 Replies
412 Views
I used the xcode tool "sarfari-web-extension-converter" and it worked well for a bit, the app built, and the extension was installed in Safari. But then I must've done something weird because now I build and run my XCode app (for the extension) and it says "***'s extension is currently on." With the button to "Quit and Open Safar Extensions Preferences..." But when I do that then the extension is not installed. The extensions tab shows "No Extensions". How do I get it re-installed so I can continue developing?
Posted
by
Post not yet marked as solved
22 Replies
7.9k Views
Issue: The Safari web inspector debugging works before the MacOS and iOS upgrade. After upgraded MacOS to 11.3 and XCode to 12.5, and iOS (iPhone) to 14.5., it stops working. Reproducing Step: Launch iOS app (Javascript wrapped under Cordova), launch Safari from Mac, debug through web inspector, iOS app crashed immediately with memory issue: WebThread (9): EXC_BAD_ACCESS (code=2, address=0x16b6c2320) error at xcode - https://developer.apple.com/forums/content/attachment/39b21f9e-2d70-41ef-884f-06f02c0960de
Posted
by
Post not yet marked as solved
3 Replies
1k Views
Hi For some time I'm facing an issue with Safari browser. For every page in my domain Safari sends wrong user agent. It introduces itself as a version 12 even though in reality it is version 14 from BigSur. In the result every external service which relies on a browser version is broken (such as analytics or ad campaigns). Clicking in development tab a "Disable Site-specific hacks" option fixes the issue and the user agent header becomes proper. With the option disabled it looks like: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Safari/605.1.15 According to documentation Safari tries to fix issues with my page but enabling or disabling the site-specific hacks option doesn't change the output in a browser console so I don't know what exactly is wrong with my page. I got two questions: Is it possible to disable "site-specific hacks" functionality using http headers, meta tags or any other site development technique rather than clicking in dev tools? Who decides and where to get information why our page was marked as broken and what actions we have to initiate to remove our page from "site-specific hacks"
Posted
by
Post not yet marked as solved
40 Replies
6k Views
Yeah as the title says. I just updated to Big Sur 11.4 and I'm developing an Ionic-based app that used to be able to be debugged using Safari's Web Inspector. Now it doesn't work at all, I'm not even getting console messages, it's like a dummy window or something that's not attached to the iOS device (even though it's spawned from the Develop - Simulator - localhost entry. It only shows Console, Sources and Audit, which sucks. Any ideas? I have a deadline real soon and this crap not working isn't good for nothing. Thanks Apple.
Posted
by
Post marked as solved
37 Replies
16k Views
Hi, I just found that many tabs in my Safari Web Inspector are no longer there. For example, previously, I have the following tabs in Web Inspector: Inspector: Elements; Network; Sources; Timelines; Storage; Graphics; Layers; Audit; Console; But now, I only have: Console; Sources; Audit; Does anyone know the root cause, and how I can restore the missing tabs? Thanks much. My OS: macOS Catalina, 10.15.7 Xcode: 12.4 Safari: 14.1.1
Posted
by
Post not yet marked as solved
3 Replies
1.8k Views
Hi I have installed IOS 15 beta and have problem with safari. The problem occurred when I closed one of the browser tabs, but when I turned on safari again, this tab came back. after I closed this tab a few times, the safari stopped working and I couldn't even turn on safari. When i click on the safari icon it won't turn on, it looks like i was opening and closing applications immediately safari before it loads.
Posted
by
Post not yet marked as solved
0 Replies
656 Views
I would like to know how can users click on a link (from a web page) and force them open that link in Safari (like target=_blank opens on a new tab but to open in Safari) regardless of where you are viewing that web page (eg. Webviews of another app, Chrome, Edge, Firefox, etc). The other question I have similarly is doing it from a native app. How can I make a deeplink call to make the action open ALWAYS in Safari and not in whatever browser is set as the default browser by the user? Safari seems to not have deeplinks and only rely in http:// https:// and ftp:// protocols but now with multiple browser options (allowing non-Apple browsers to be set as your default) I think it is time for Safari to have its deeplinks like “safari://“ Is that already available, possible, coming in 2021?
Posted
by
Post not yet marked as solved
0 Replies
538 Views
Hi, Whenever I try to connect my iPad or iPhone to my Mac book pro to debug webpages on Safari and Safari Technology preview, on the Safari Debug menu -> iPad i see a connecting message for few mins followed by "Enable web inspector in Device" message. The web inspector has been enabled on both iPad and iPhone still I see the above message. OS: Mac Big Sur 11.5.2 Safari: 14.1.2 (16611.3.10.1.6) Safari Technology Preview: Release 130 (Safari 15.0, WebKit 16612.1.26.1.5) iPad Air: 14.7.1 iPhone 11: 14.7.1 I tried most of the recommendations on the forum and other websites, still nothing works. I am not able to debug or see the web inspector. Following are the things which I have already tried couple of times.. Reset Location & privacy Reboot of all 3 devices Toggle web inspector option on the ipad/iphone Toggle Safari "Show develop menu in menu bar." Please let me know if there is anything else which needs to be done to debug webpages..
Posted
by
Post not yet marked as solved
0 Replies
650 Views
Hi, I have an extension on which I have allowed "foo.com", but then from permissions in manifest.json I removed "foo.com" then re-built the extension but still see "foo.com" in the extension's permissions list in preferences. Then I uninstalled the extension and re-built, still I can see "foo.com" in the list and allowed, it should not have been there, as I have removed now. How do I reset an extension in Safari? If even uninstalling and reinstalling is not working? Thanks
Posted
by
Post not yet marked as solved
0 Replies
384 Views
Hi, I've been scratching my head for few days for the same problem I'm having. When I initially tab into my web-app, the bottom tab bar renders beautifully, with the bottom 0px and height of 64px. But the issue occurs when I leave the app and re-enter after few seconds, suddenly the tab bar container gets shrink down from where I expected to be leaving a horror gray area. On Android shows no problem but with iPhone-which I think is because of Safari iOS bottom navigator-the bottom: 0px, doesn't get the right layout. I'm attaching pictures to describe what I'm going through. There's one more weird part. I have several other apps which basically has same code line, front-end and back-end, but only two of them seem to show the same bug. Is this something to do with the native? Would appreciate any suggestions! Thank you,
Posted
by
Post not yet marked as solved
0 Replies
245 Views
When I open the inspector from Safari Web Inspector or Safari (latest version of today) I can see the device and the app on the developper menu. When I click on the app to be debugged it opens and closes as soon as it was opened. After the device is in the status "Connecting" Then I enable and disable "Connect via network" for my device to be re-connected and same as before it opens and closes. I see that it is a very common problem. When Apple will allow developers to debug the code and note the debugger ?
Posted
by
crg
Post not yet marked as solved
0 Replies
308 Views
Hi. I am a web developer and I wanted to please know the code either in HTML or JAVASCRIPT or CSS to remove the bottom bar in the safari in order to embed it within the site. My intention is for the site to look visually like an app without the bottom bar of the safari. Best Regards, David Genish
Posted
by
Post marked as solved
1 Replies
297 Views
Hi, Can you please help me change the display name of the safari extension for the iPhone/iPad? I did try all combinations of updating Build and Bundle ids and display names, but nothing worked. I tried updating the CBBundleDisplayName property in the project file and also in plist file, but didn't make any difference. My app/extension ID is: "ABC.MNO.XYZ", and accordingly, there are four targets generated in Xcode, mainly App, Test, UITest, Extension. The last target (Extension) one is already set to "ABC MNO XYZ Extension" by default, and there I tried to change the name, but nothing worked, either build issues or no change in the app. In sum, the app name and extension names, both in Settings >Safari>Extensions and also in the Safari Browser Extension's popup menu, the name I want to set is "ABC MNO". How to resolve this issue?
Posted
by
Post not yet marked as solved
1 Replies
777 Views
Hello, I have a very strange problem, only on safari. I have set up cross-origin access on my api, and it doesn't only work on safari. More exactly, if during the call I do not pass headers, it works: fetch('https://api.myapp.com/api/safari-test') 200 OK Access-Control-Allow-Methods: GET,OPTIONS Access-Control-Allow-Origin: https://www.myapp.com Access-Control-Allow-Headers: Accept,Accept-Encoding,Accept-Language,Access-Control-Request-Header,Access-Control-Request-Method,Authorization,Cache-Control,Connection,Content-Type,DNT,Host,If-Modified-Since,Keep-Alive,Origin,Pragma,Referer,User-Agent,x-csrf-token,x-requested-with Content-Type: application/json; charset=UTF-8 Content-Encoding: gzip Date: Thu, 23 Sep 2021 16:32:00 GMT Vary: Accept-Encoding, Origin Server: nginx But if I pass headers, it doesn't work anymore: fetch('https://api.myapp.com/api/safari-test', { method: 'GET', headers: new Headers({ 'Authorization' : 'Bearer ...' }), mode: 'cors', cache: 'default' }) [err] Fetch API cannot load https://api.myapp.com/api/safari-test due to access control checks. I don't understand why, all the necessary headers are transmitted. Here is my nginx configuration: location ~ ^/api/safari-test { set $cors ''; if ($http_origin ~ ^(https?:\/\/www\.myapp\.com)$) { set $cors 'true'; } if ($request_method = 'OPTIONS') { set $cors "${cors}options"; } if ($request_method = 'GET') { set $cors "${cors}get"; } if ($cors = "true") { add_header 'Access-Control-Allow-Origin' "$http_origin" always; add_header 'Vary' Origin always; } if ($cors = "trueget") { add_header 'Access-Control-Allow-Origin' "$http_origin" always; add_header 'Access-Control-Allow-Methods' 'GET,OPTIONS' always; add_header 'Access-Control-Allow-Headers' 'Accept,Accept-Encoding,Accept-Language,Access-Control-Request-Header,Access-Control-Request-Method,Authorization,Cache-Control,Connection,Content-Type,DNT,Host,If-Modified-Since,Keep-Alive,Origin,Pragma,Referer,User-Agent,x-csrf-token,x-requested-with' always; add_header 'Vary' Origin always; } if ($cors = "trueoptions") { add_header 'Connection' 'keep-alive' always; add_header 'Access-Control-Allow-Origin' "$http_origin" always; add_header 'Access-Control-Allow-Methods' 'GET,OPTIONS' always; add_header 'Access-Control-Allow-Headers' 'Accept,Accept-Encoding,Accept-Language,Access-Control-Request-Header,Access-Control-Request-Method,Authorization,Cache-Control,Connection,Content-Type,DNT,Host,If-Modified-Since,Keep-Alive,Origin,Pragma,Referer,User-Agent,x-csrf-token,x-requested-with' always; add_header 'Access-Control-Max-Age' 3600 always; add_header 'Content-Type' 'text/plain charset=UTF-8' always; add_header 'Content-Length' 0 always; add_header 'Vary' Origin always; return 204; } fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_read_timeout 60s; fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_index micro.php; fastcgi_param APP_ENV production; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root/micro.php; fastcgi_param SCRIPT_NAME micro.php; } Thanks to anyone for an idea for a solution !!!
Posted
by
Post not yet marked as solved
0 Replies
412 Views
Hello, in order to workaround non-working websockets with TLSv1.3 I was enabling NSURLSession WebSocket experimental feature. I've recently got a new MacBook with a brand new MacOS and latest Safari 15, where I found non-working websockets and didn't found NSURLSession WebSocket option. I am not sure at what point/version mentioned feature disappeared from the Develop menu... Is there any other way to enable it? Why it was removed? Anton
Posted
by
Post not yet marked as solved
1 Replies
1k Views
Some people don’t like the address bar on mobile safari at the bottom of a webpage and can easily move it back to the top. I prefer the address bar at the top because I have a fixed footer or fixed bottom menu on my messaging app and the address bar tends to make that bottom area somewhat crowded. So it’s great that Apple gave the user a choice. The issue becomes apparent when the user chooses to move the address bar back to the to top and then swipes up. This causes the address bar at the top to shrink which is good, but at the same time it moves the fixed footer up quite a bit creating a huge area of empty space where the address bar would have been if the user hadn’t moved it back to the top. This shrinks the viewable area of the chat screen considerably. Not to mention it’s an area that is colored the same as the top Navbar. And as you can see in my image it looks ridiculous. I hope Apple provides a fix for this issue or someone has a workaround code I could integrate.
Posted
by