Question

I desperately need to use the Safari console on iOS 7 to debug a site. I've hooked my iPhone (5) displaying the site to my Mac. I've started Safari (v6.0.5), gone to the Develop menu, and started the web inspector for the site I'm on. I can see the list of elements on the site, which confirms I'm inside the correct inspector.

From what I've read, the logs to the console should be displayed inside the Logs section, and from what I've found inside Apple's iOS Safari documentation, I should be able to view logs inside there. For me though, nothing is ever logged. I can't even access any variables or functions; when I type anything in (e.g. document.title), it just 'logs' exactly what I've written, with the text I've just typed still in the input field. However, typing something that causes the browser on the device to show life works (e.g. alert('hi'); displays the alert dialog box on the device).

Can anyone help? This issue we have is only happening on iOS, and there's barely any other way to find what's going wrong. Is this problem limited to iOS 7?

Was it helpful?

Solution

I can confirm that this is an iOS 7 issue. The console.log statement works fine when using an iOS 6 or below device, but with iOS 7 won't show at all :( Apple == new Microsoft();

Only minutes after posting this I got logging to work again, not sure if this is required, but it seemed to do magic for me:

  1. Connect iOS 7 device
  2. Open XCode
  3. Setup device for development
  4. Connect using Safari

Presto, I can see log messages again?!? (Mind you, I had not made any code-changes)

OTHER TIPS

I had the same problem, just after updating to iOS 7. The solution was to update safari to the latest version for developers, which is version 6.1.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top