12

Background

My company recently made a shift to app development. While developing and Q/Aing on Android was relatively painless, iOS, on the other hand is proving to be a pain.

The task involves looking at the page source of our app (which has a custom browser). I heard that Web Inspector is a great tool, so I went with it.

Problem

  • First of all, Web Inspector has been able to detect the custom browser before.
  • But quite frequently, Web Inspector's menu gives the "No Inspectable Applications" prompt.
  • This happens with the exact same version of the app that worked earlier.
  • There seems to be no trigger whatsoever; yesterday Web Inspector was working with the custom browser, and then after a few hours (during which I may have disconnected and reconnected the iPhone) it stopped working.

I have not been able to figure out why despite breaking my head for a week.

Observations

I have an iPhone 4S running iOS 7.0.4. My Mac Mini has Safari 7.0.

In the phone options

  • Web Inspector is turned on in the iPhone menu
  • All privacy modes are set to off - Do Not Track, Block Cookies, etc. (this question)
  • Javascript is turned on in the phone.

In Safari on my Mac Mini - Develop menu is enabled (obviously)

More observations

  • iOS Safari is detected by Web Inspector.

So, how do I go about debugging this? What could be a possible cause and what could be the solution?

Community
  • 1
  • 1
Vish
  • 2,144
  • 5
  • 25
  • 48

7 Answers7

16

I was having the same problem, it was cause I was running iOS 8,fixed by updating Safari to 7.1 .

jonfer
  • 1,524
  • 2
  • 14
  • 23
7

An update for iOS 9 (using OSX El Capitan):

On your mobile device under Settings -> Safari -> Fraudulent Website Warning = OFF [default = ON]

Steve Seeger
  • 1,409
  • 2
  • 20
  • 25
5

For me to make it work I needed to go into iPhone's Settings -> Safari > Advanced and enable Web Inspector option. (iOS 9.1)

infografnet
  • 3,749
  • 1
  • 35
  • 35
  • 2
    As mentioned in the question, web inspector was already enabled in the iPhone settings. – Vish Dec 01 '15 at 15:45
4

I was having exactly same trouble. I managed to correct the situation by clearing the cookies and history from the mobile Safari menu. After this, it showed up in the Mac Develop menu.

Hopefully this will correct your situation as well.

Michikawa
  • 123
  • 1
  • 7
  • 1
    Thanks for the answer. I did try that earlier, but it didn't help. – Vish Feb 28 '14 at 04:13
  • I had a problem that sometimes I was able to debug my application and other times I wasn't. I had to reboot my Mac every time to enable debug. This seems to solved my issue. – leonprou Mar 07 '15 at 07:18
3

this is probably an oversight where someone forgot to include the ios 8 version of Mobile Safari as an inspectable application. Get with it guys. I was able to connect my iPad to a MacMini we have with Yosemite Beta.

So I have also discovered that the web inspector in Yosemite Beta doesn't inspect well. I am able to Breakpoint in Javascript, but items are not inspectable in the inspection pane. The console does report correct information. Don't be fooled as I was! To inspect the value of something in this web inspector you must access the values via the console, type in the variable and it will return the result it has correctly.

Quadrivium
  • 137
  • 2
  • 2
  • 15
  • Yep, it keeps telling me No Inspectable Applications even though I have cleared cookies and everything. – Ardo K Sep 18 '14 at 18:44
  • 3
    Turns out I just needed to update Safari on my Mac to 7.1 in order to debug on my iPad running iOS 8. – Liam Sep 23 '14 at 14:49
  • Thanks Liam, the first thing I did was update OSX and check for other updates, said no updates but I was still at 7.0.6! ... check back and the update is there. Updated to 7.1, cleared mobile browsing data once more and in business! – Shwaydogg Sep 25 '14 at 22:31
  • So Apple did fix the problem with an update to Safari for Mavericks a couple days later. – Quadrivium Sep 26 '14 at 19:08
1

As it happens, the solution that worked for me (reliably) was:

  • Build the app from source locally (in Xcode)
  • Deploy it to the iPhone, connected through USB

For some reason, Web Inspector works reliably when the app is started this way. I am unable to figure out why, but it works. Comments welcome.

Vish
  • 2,144
  • 5
  • 25
  • 48
  • I suspect that you have XCode 6.x.x on your mac and that's using it's own inspector, or allowing the inspection, when it is running. – Quadrivium Sep 18 '14 at 20:47
  • 1
    From what I learned, it seems that when the ipa is signed with a distributor certificate, the web inspector, even is activated is disabled for all embedded web-views. If signed with a developer certificate (as it is done when deploying from the source in xcode), it works. – Claude Houle Mar 12 '15 at 15:22
  • @Shadow_x99 thanks for this...this is probably my problem. Do you know of anyway around this? Right now I'm having an issue where a bug seems to appear only when its deployed via the distribute certificate...and I can't inspect it to see whats going on. – Mickey Sly Dec 12 '16 at 18:18
0

Here's a possibility, mostly because I just ran into this myself...

Is your browser set for private browsing?

If it is, turn that off! You can't use the inspector while it's on.