83

I need to debug an HTML app on ipad. I used to be able to connect ipad by USB cable to my mac and it would show in the "Develop" menu in Safari. I have two ipads now - one with iOS 6 and another with iOS 7. The iOS 6 one is showing correctly and I can access the web inspector from my mac. iOS 7 ipad is not showing in the "Develop" menu.

I have the latest version of iOS installed (version 7.1) and the latest version of Safari (7.0.2) on Maverick.

Any suggestions are welcome.

Shams Ahmed
  • 4,498
  • 4
  • 21
  • 27
Aleks G
  • 56,435
  • 29
  • 168
  • 265

20 Answers20

125

Enable web inspector on your iOS device by following these steps:

iOS Device > Settings app > Safari > Advanced > Web Inspector

This setting allows you to connect to safari on your desktop.

Iulian Onofrei
  • 9,188
  • 10
  • 67
  • 113
Shams Ahmed
  • 4,498
  • 4
  • 21
  • 27
  • 22
    If you read the question carefully, you'll understand that I have done that already. – Aleks G Apr 01 '14 at 07:38
  • 1
    This seems to be a common issue with no single way of resolving. look at using nightly build as discussed [here](http://stackoverflow.com/questions/18933704/iphone-connected-via-usb-not-appearing-in-os-x-safari-develop-menu-after-upgra) or removing safari caches [here](https://discussions.apple.com/thread/5476977?start=0&tstart=0) – Shams Ahmed Apr 01 '14 at 08:29
74

I know this is a little late. I had this same issue and figured I would post how I got it to work in my case just in case it helps anyone in the future. I enabled it on the iPad and it didn't show. I tried closing Safari on the iPad, disconnecting and reconnecting the cable and neither worked. It ended up for me being really simple, I just quit of Safari on my laptop and restarted it and Safari then recognized the iPad and allowed me to debug. This may not work for every case but it did for me, hope it helps.

edit: just a note, I had the iPad plugged in with web inspector enabled when I restarted Safari.

Robert-W
  • 1,541
  • 12
  • 16
  • 3
    Crazy, I just spent a good time trying to get this to work. I was afraid I wouldn't be able to debug my Cordova app with iOS 9 beta 3... – momo Jul 16 '15 at 03:28
  • 4
    This super simple solution worked for me after an upgrade to El Capitan caused my iPhone to disappear from the develop menu. – Mike N Oct 08 '15 at 12:09
  • 4
    yah just restarting safari worked when all else is setup. i'm in el capitan as well so don't know if that had anything to do with it, probably. – King Friday Oct 13 '15 at 17:15
  • 3
    This also just worked for me, saving hours of frustration. I guess there is a bug in Safari... – William Stein Jun 23 '17 at 06:41
  • Thanks, this was helpful to try – chandlervdw Jan 13 '20 at 19:34
24

In my case I was running iOS 11 BETA on the iPhone, and was trying to access from Safari 10 (current stable version). I have installed Safari 11 BETA, and now it is working as expected.

So in general: Make sure you are running the latest version of Safari. And if you are testing on iOS BETAs, you can download Safari Betas & Safari Technology previews from here (Thank you for the link @Jacob Ford).

tomacco
  • 710
  • 4
  • 26
  • 13
    If the device briefly shows up in Safari Develop menu when you toggle Inspector on in iOS settings, then flickers out, this is likely the issue for you. Apple Developers may download Safari betas [here](https://developer.apple.com/safari/download/). – Jacob Ford Aug 18 '17 at 16:47
  • Steve, if you're listening, please come back! – 1GR3 Nov 01 '17 at 08:10
  • @JacobFord well done! that indeed fixed the issue I had with 2 devices running iOS11 (plugged to a Sierra Mac) – Capsule Nov 20 '17 at 04:49
  • @JacobFord Thank you ! The link no longer works however Safari 11 is now out just update Safari – Geza Turi Jan 21 '18 at 17:26
19

You also need to enable web inspector from the device.

Open the settings app, select safari, select advance and then turn on web inspector.

ref: http://www.spiraltrack.com/blog/how-debug-iphone-and-ipad-web-applications-using-safari.

bartoindahouse
  • 411
  • 2
  • 5
  • 3
    This. Totally this. 45 minutes of this, in fact. >.< You'd think installing a developer profile on a device would automatically switch things like this on, but I'm learning not to expect actual good design from Apple, just the impression of it. >. – Benjamin Nolan Dec 30 '14 at 04:17
  • This is very important !! I had followed the steps as mentioned everywhere, but strangely few people mentioned that we need to adjust the setting in the phone as well. It won't work until this is done! – ashish-goel Aug 21 '17 at 09:16
  • Link is no more :( – Jim Pedid Jul 22 '19 at 14:00
12

Using a genuine Apple lightning cable (instead of a fake one) solved my problem.

Chris Xue
  • 2,317
  • 1
  • 25
  • 21
11

After all these years, I finally found out what the problem was! Apparently, Safari version on the Mac needs to be the same or newer than the version on the iPad. If iPad has a newer version than Mac, then it won't be visible. If Mac has the same or newer version, then iPad is visible and can be debugged.

I wish Apple had documented this anywhere - would have saved loads of time for a lot of people.

Aleks G
  • 56,435
  • 29
  • 168
  • 265
11

One more tip to try - after trying many of the above suggestions I turned off "Sync with this iPhone over Wi-Fi" in iTunes.

Voila! Got my iPhone into the Develop menu!

(for context, this is in Mojave 10.14.6, iOS 13.1.3, Safari 13.0.3)

BearSnowstorm
  • 111
  • 1
  • 3
  • Thank you! I tried all solutions and only yours worked. – Jonathan Berger Nov 02 '19 at 01:17
  • Thank you so much for posting this! Why would a setting in iTunes prevent Safari from seeing the phone, even when iTunes isn't running and is set to not automatically open. This makes zero sense but it works. – Mike Postma Nov 08 '19 at 21:14
  • 1
    I had this setting turned off by default. I had to enable ***and*** disable it again. – Florian Nov 25 '19 at 20:01
  • 1
    Give this Man a Medal ! It took me 2 days - I saw your comment earlier but never thought it could work - it Works ! – Amit Kulkarni Feb 01 '20 at 15:03
  • 1
    Wonderful! I had recurring issues with this and the only way I could make it work (sometimes) was to reset Location & Privacy, close Safari, unplug my device, etc. It was always a temporary fix though and the issues would come back very quickly. This however seems to work more permanently! I confirm what @Florian said: the setting was off by default for me, turning it on then off (after letting the sync finish) worked. On Catalina, this setting is named "Show this iPhone when on Wi-Fi" under General when you select your iDevice in the Finder. – Form Mar 19 '20 at 19:11
7

If you already have enabled web inspector on your iOS device by following these steps and still it is not showing you can try just disabling and then again enable web Inspector in device's Safari browser.

iOS Device > Settings app > Safari > Advanced > Web Inspector

Iulian Onofrei
  • 9,188
  • 10
  • 67
  • 113
Mayank Kumar
  • 313
  • 2
  • 13
7

I just had to toggle the web inspector on and off on the device I was trying to connect and it showed up under Safari's develop menu:

iOS Device > Settings app > Safari > Advanced > Web Inspector

Iulian Onofrei
  • 9,188
  • 10
  • 67
  • 113
stillfire
  • 209
  • 3
  • 8
7

Had the same issue after updating to Safari 13 and Xcode 11.3 on macOS Catalina. For me the following change brought the iOS device back to Safari's Develop menu:

  1. Connect the device via USB
  2. Start Xcode and go to menu "Window > Devices and Simulators"
  3. Select the device
  4. Check the "Connect via network" option
brotherli
  • 416
  • 5
  • 8
6

I've tried all the above but the only thing that works for me is to put iphone/ipad in airplane mode and then unplug/plug in the lighting cable a few times while keeping the develop menu open, once it shows up you can then turn off airplane mode

Matt
  • 71
  • 1
  • 4
2

Additional go to:

Device Settings -> Safari -> Private Browsing = OFF
4b0
  • 21,981
  • 30
  • 95
  • 142
2

Another gotcha for the basket: If you've another OS running in a virtual machine that you've forgotten about then the iPad can end up connected to that and hence invisible to Safari on the Mac.

Simon Jenkins
  • 529
  • 5
  • 9
  • Same here, when I run Homestead (Vagrant box) my iPhone while shortly show up in Safari dev tools and then "go away". If I stop the vagrant machine (`vagrant halt`) Safari and the dev tools work as expected. Did you found a way to disable the "USB forwarding"? – Paul Vincent Beigang May 18 '17 at 08:01
  • My VMs are in Parallels which has configuration options for this. – Simon Jenkins May 18 '17 at 18:55
1

For me, the problem was the different OS versions between the iPad and the iMac. I updated the iPad with the latest OS (iOS 11.2.2 at the time of this writing), but the iMac was under El Capitan (10.11.6) macOS. Once I updated the iMac to High Sierra (10.13.2) everything worked correctly.

BernieSF
  • 1,722
  • 1
  • 28
  • 42
1

I've found that Simulator is always in Safari's Develop menu if it's already running when Safari launches, and Simulator is never in the menu if Safari is launched first.

So you need to restart your Safari again.

That's Simulator 11.2 (comes with Xcode 9.1), Safari 11.0.3 and macOS 10.13.3

Long Nguyen
  • 9,898
  • 5
  • 53
  • 52
0

Similar to what BernieSF said, with a little more detail from my specific scenario. I was getting ready to upgrade my laptop to High Sierra to try and solve this, but I'm glad I didn't have to.

I have been trying to solve this for some time now, so maybe my situation will apply to someone else. The problem was the version of Safari I had installed on my older Macbook Air.

Symptoms: All the appropriate settings were enabled, and when I plugged in my phone to the USB cable, it would show up in the Develop tab, and then quickly disappear.

Setup: iPhone 7 on 11.3.1 and Macbook Air(3,2) on 10.12. On the Air, Safari was version 10.1.

I read in an Apple thread that for iOS 11, I needed to have Safari 11, but I had no option to update Safari in the App Store. There was a system update available, and the update to 10.13 available, but not Safari.

Solution:

  1. I did the system updates (not the update to 10.13)
  2. After my computer rebooted, the App Store then offered me an update to Safari 11.1.1 and I installed that

Voila! It now works!

ch1pn3ss
  • 429
  • 3
  • 10
0

I had this issue with iOS 13.2.3 on both macOS Mojave and Catalina.

When I disconnected the iPhone from the Wi-Fi and only connected it via the cable the dropdown in Safari showed the iPhone.

The solution for me was: In iTunes click the sync-settings button and enabling and then disabling the "Sync with this iPhone over Wi-Fi".

After that the iPhone showed up again in Safari's developer menu.

Florian
  • 373
  • 5
  • 18
0

I experienced the same issue today with iOS 13 and Mac OS 10.14 (Mojave).

What fixed it for me was simply installing a required Update in MacOS.

However, it is not an update that is installed via system preferences but only via a dialog that appears when trying to connect the devices.

Unfortunately the dialog appeared behind all other windows and could not be tabbed to. Thus I did not see it at all until I closed all other windows.

Regarding the dialog itself - here some information from Apple support:

https://support.apple.com/en-us/HT208831

conceptdeluxe
  • 3,753
  • 3
  • 25
  • 29
0

In my case, I was using iOS beta version.

Xcode > Window > Devices and Simulators > Connect via network

then I can see error messages.

"The current device configuration is unsupported. This iPhone X (Model A1865, A1901, A1902,…" "To run on this device, please update to a version of Xcode that supports iOS 13.6. You can download Xcode from the Mac App Store or the Apple Developer website."

Oh yeah.

-1

Another thing to check is Build Settings > Signing > Code Signing Identity

Make sure both Release and Debug are set to iOS Developer

whodeee
  • 617
  • 5
  • 18
  • 1
    This looks like something from xcode and this has nothing to do with that, but the Safari.app and iOS. – FooBar Oct 05 '19 at 20:37
  • @FooBar that is true - not sure what I was thinking when I answered this. – whodeee Oct 22 '19 at 20:25
  • Thanks @whodeee. This worked. The Code Signing Identity in XCode was wrongly set to Adhoc porofile for me. For cordova apps to show in Safari's Develop menu the app must be signed with "Developer" profile and not Adhoc profile. – Pawan Jain Mar 03 '20 at 08:39