{"id":11766,"date":"2020-10-04T10:06:35","date_gmt":"2020-10-04T10:06:35","guid":{"rendered":"https:\/\/www.itwriting.com\/blog\/?p=11766"},"modified":"2020-10-04T10:06:35","modified_gmt":"2020-10-04T10:06:35","slug":"debugging-safari-on-an-old-ipad","status":"publish","type":"post","link":"https:\/\/www.itwriting.com\/blog\/11766-debugging-safari-on-an-old-ipad.html","title":{"rendered":"Debugging Safari on an old iPad"},"content":{"rendered":"<p>Someone was trying to use the bridge application I have <a href=\"https:\/\/www.itwriting.com\/blog\/11725-developing-software-for-playing-bridge.html\" target=\"_blank\">in progress<\/a>, using an iPad 2.0. There were a couple of interesting things about this. One was that I had to rethink the warning thrown up, base on <a href=\"https:\/\/modernizr.com\/\" target=\"_blank\">Modernizr<\/a>, which detects incompatible web browsers. The problem (obvious when you think about it) is that if you use some potentially incompatible features in the same page where you are testing for them, then with an old web browser the JavaScript fails with a syntax error and the warning does not appear. The fix: I now show the warning by default, and the compatibility check hides it.<\/p>\n<p>Still, I was interested in the Safari error and wanted to debug it, in case it was something I could fix. How do you debug Safari on an iPad?&nbsp; The way it is meant to work is this:<\/p>\n<p>&#8211; On a Mac, enable the Safari Develop menu (in Safari preferences, Advanced, Show Develop menu).<\/p>\n<p>&#8211; On iOS, enable Safari Web Inspector (Settings \u2013 Safari \u2013 Advanced \u2013 Web Inspector).<\/p>\n<p>&#8211; Connect the iPad to the Mac via USB. You can now use Web Inspector on the Mac to debug the Safari iOS pages and scripts.<\/p>\n<p>This did not work for me on my Catalina Mac. The iOS Safari did not show up in the Web Inspector on Safari Mac. I could get it to show briefly, by switching Web Inspector on the iPad off and on again, but after than, no go. I tried a few things, but none of the proposed solutions I could find for this issue fixed it for me.<\/p>\n<p>I have an older 2011 Mac Mini in a drawer, so I thought that might work, being a similar age to the iPad. I fired it up, marvelled at how old-fashioned the UI looked (I had reset it to OS X Lion), and connected the iPad. No go. Same problem as with Catalina.<\/p>\n<p>Surprisingly, what did work were the instructions <a href=\"https:\/\/washamdev.com\/debug-a-website-in-ios-safari-on-windows\/\" target=\"_blank\">here<\/a> (more or less) for debugging Safari iOS on Windows. This is based on the RemoteDebug iOS WebKit Adapter described <a href=\"https:\/\/medium.com\/@auchenberg\/hello-remotedebug-ios-webkit-adapter-debug-safari-and-ios-webviews-from-anywhere-2a8553df7465\" target=\"_blank\">here<\/a>, a project which originated as an internal Microsoft experiment. <\/p>\n<p><a href=\"https:\/\/www.itwriting.com\/blog\/wp-content\/uploads\/2020\/10\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"804\" height=\"424\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/www.itwriting.com\/blog\/wp-content\/uploads\/2020\/10\/image_thumb.png\" border=\"0\"><\/a><\/p>\n<p>I did find it amusing that I could do this on Windows, having failed with the Mac.<\/p>\n<p>The next generation of this is <a href=\"https:\/\/inspect.dev\/\" target=\"_blank\">Inspect<\/a>. This is in private beta, though the GitHub page for RemoteDebug <a href=\"https:\/\/github.com\/RemoteDebug\/remotedebug-ios-webkit-adapter\" target=\"_blank\">says<\/a> it has been superseded and to use Inspect instead. <\/p>\n<p>It worked for me though.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Someone was trying to use the bridge application I have in progress, using an iPad 2.0. There were a couple of interesting things about this. One was that I had to rethink the warning thrown up, base on Modernizr, which detects incompatible web browsers. The problem (obvious when you think about it) is that if &hellip; <a href=\"https:\/\/www.itwriting.com\/blog\/11766-debugging-safari-on-an-old-ipad.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Debugging Safari on an old iPad<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,60,1519,96],"tags":[],"class_list":["post-11766","post","type-post","status-publish","format-standard","hentry","category-development","category-notes-from-the-field","category-tech","category-web-authoring"],"_links":{"self":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/11766","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/comments?post=11766"}],"version-history":[{"count":1,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/11766\/revisions"}],"predecessor-version":[{"id":11767,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/11766\/revisions\/11767"}],"wp:attachment":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/media?parent=11766"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/categories?post=11766"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/tags?post=11766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}