简体   繁体   English

为什么 Safari 在使用 iOS 6 设备进行远程调试时显示“No Inspectable Applications”?

[英]Why Safari shows “No Inspectable Applications” during remote debugging with iOS 6 device?

When I connect my iOS 6 device for remote debugging for testing my mobile web application, The safari develop menu with my device name shows "No Inspectable Applications".当我连接我的 iOS 6 设备进行远程调试以测试我的移动 Web 应用程序时,带有我的设备名称的 safari 开发菜单显示“No Inspectable Applications”。

I have enabled web inspector ON in my device safari device settings.我在我的设备 safari 设备设置中启用了网络检查器。

Why this is happening?为什么会发生这种情况?

An update for iOS 9 (using OSX El Capitan): iOS 9 更新(使用 OSX El Capitan):

On your mobile device under Settings -> Safari -> Fraudulent Website Warning = OFF [default = ON]在您的移动设备上的设置 -> Safari -> 欺诈网站警告 = 关闭 [默认 = 开启]

I also needed to re-connect the iPhone after changing this setting更改此设置后,我还需要重新连接 iPhone

This solved it for me.这为我解决了它。

If you have private browsing enabled in Settings > Safari , you will not be able to use remote debugging.如果您在Settings > Safari启用了隐私浏览,您将无法使用远程调试。 If you turned off private browsing, it will work like a charm.如果您关闭隐私浏览,它会像魅力一样工作。

I recently had problems debugging a UIWebView in desktop Safari – and it turns out the problem was with my Xcode configuration for the app.我最近在桌面 Safari 中调试 UIWebView 时遇到问题 - 结果证明问题出在我的 Xcode 配置上。 The most recent build had been provisioned for production, rather than for Testing.最新的构建已被配置用于生产,而不是用于测试。 After re-building the app for Testing, it showed up once more in the Safari Debug menu :-)重新构建应用程序进行测试后,它再次出现在 Safari 调试菜单中:-)

I had the same issue eventually I understand that the problem is with the Xcode settings.我遇到了同样的问题,最终我明白问题出在 Xcode 设置上。

To solve this issue:要解决此问题:

Enable Safari Debug启用 Safari 调试

First of all verify that on the device you have enabled the Safari debugger (on the device go to: Settings >> Safari >> Advanced >> Enable Debug ; or iOS 9+ turn on: Settings >> Safari >> Advanced >> Web Inspector ).首先验证您是否在设备上启用了 Safari 调试器(在设备上转到: Settings >> Safari >> Advanced >> Enable Debug ;或 iOS 9+ 打开: Settings >> Safari >> Advanced >> Web Inspector )。 If you've done this you will see your device in Safari >> Develop.如果您已完成此操作,您将在 Safari >> 开发中看到您的设备。 if you see your device but you don't see your application under it, instead " no inspectable application ", check your Xcode settings.如果您看到您的设备,但在其下没有看到您的应用程序,而是“ no inspectable application ”,请检查您的 Xcode 设置。

Xcode Xcode

1. Change Build Configuration: 1. 更改构建配置:

Right click on the project name (under the play/run button) and select 'Edit Schema...', in the 'Edit Schema' window under 'Run' tab change the 'Build Configuration' to 'Debug' (instead of 'Release')右键单击项目名称(在播放/运行按钮下)并选择“编辑架构...”,在“运行”选项卡下的“编辑架构”窗口中,将“构建配置”更改为“调试”(而不是“发布')

2. Change the Code Signing: 2. 更改代码签名:

Click on the project name in the files tree, to display the project settings.单击文件树中的项目名称,以显示项目设置。 Select the 'Build Settings' tab.选择“构建设置”选项卡。 Change the 'Provision Profile' to 'Automatic'.将“配置文件”更改为“自动”。 Change the 'Code Sign Identity' to 'iOS Developer'.将“代码签名标识”更改为“iOS 开发人员”。

Note that changing the code signing will prevent you from release versions for production, however you will be able to debug your application.请注意,更改代码签名将阻止您发布用于生产的版本,但是您将能够调试您的应用程序。

A few things to try:要尝试的几件事:

  1. On your iPhone/iPad, double-tap the Home button to bring up the list of running apps, close Safari (or appropriate Web App), then reopen在您的 iPhone/iPad 上,双击主页按钮以显示正在运行的应用程序列表,关闭 Safari(或相应的 Web 应用程序),然后重新打开

  2. Quit/reopen Safari on the Mac在 Mac 上退出/重新打开 Safari

  3. Unplug/plug back in iOS device拔下/重新插入 iOS 设备

As a side note, I can attach to Safari with private browsing enabled on the iOS device.作为旁注,我可以在 iOS 设备上启用隐私浏览的情况下附加到 Safari。

I went to Settings > Safari > Advanced and toggled the Web Inspector switch from on to off to on again.我去Settings > Safari > Advanced ,并触发了Web Inspector从开关on ,以offon一次。 That did it for me!那是为我做的!

如果您刚刚安装了 XCode 9,请不要忘记安装 Safari 11,否则您将看到“no inspecable applications”

In my case, I had Safari 10.0.2, running on El Capitan and when trying to run apps on the Simulator (iphone 7), I did not even have the Simulator option in the Safari's Develop menu.就我而言,我有 Safari 10.0.2,在 El Capitan 上运行,当尝试在模拟器 (iphone 7) 上运行应用程序时,我什至在 Safari 的开发菜单中没有模拟器选项。 Updating to Sierra, solved the problem.更新到 Sierra,解决了这个问题。

I resolved the issue with rebuilding the app with new key - certificate (p12) and provisioning profile.我解决了使用新密钥重建应用程序的问题 - 证书 (p12) 和配置文件。 My developer account and certificates expired, so it just stopped recognizing my PhoneGap app in Developer menu.我的开发人员帐户和证书已过期,因此它在“开发人员”菜单中停止识别我的 PhoneGap 应用程序。

I had the same problem with Safari 11.0.3 on High Sierra.我在 High Sierra 上使用 Safari 11.0.3 遇到了同样的问题。 The only think that worked for me is installing Safari Technology Preview from here .唯一对我有用的想法是从这里安装Safari Technology Preview

确保您没有连接到 VPN。

After all the answers here failed to resolve the issue for me, I figured out that installing the Safari Technology Preview version worked well.在此处的所有答案都未能为我解决问题之后,我发现安装Safari Technology Preview 版本效果很好。

Install this beta of Safari, launch it, enable developer tools in advanced preferences, and your phone will appear in the develop bar (provided a page in mobile Safari is open).安装此 Safari 测试版,启动它,在高级首选项中启用开发人员工具,您的手机将出现在开发栏中(前提是移动版 Safari 中的页面已打开)。

I was trying to get this working via the iOS simulator and none of the previously stated answers worked, even though I tried them all.我试图通过 iOS 模拟器让它工作,但前面提到的答案都没有奏效,即使我都试过了。 Instead, running the following worked:相反,运行以下工作:

npm install -g ios-sim

After that, once I started the application, the simulator appeared under the Develop menu on Safari.之后,一旦我启动了应用程序,模拟器就会出现在 Safari 的“ Develop菜单下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Desktop Safari 7.0.6无法检查iOS8 iPhone 5 Mobile Safari。“没有可检测的应用程序” - iOS8 iPhone 5 Mobile Safari cannot be inspected by Desktop Safari 7.0.6 .. “No Inspectable Applications” 为什么在调试过程中会收到有关从远程iOS设备读取Xcode框架文件的警告? - Why am I getting warnings about Xcode reading framework files from the remote iOS device during debugging? 为什么Web Inspector向我显示“没有可检查的应用程序”? - Why is Web Inspector showing me “no inspectable applications”? 使用OpenSTF进行iOS设备远程调试 - iOS device remote debugging with OpenSTF 使用 USB 的 Safari iOS 调试显示空白屏幕 - Safari iOS debugging with USB shows blank screen Safari远程调试iOS上的空白屏幕 - Blank screen on Safari remote debugging iOS 远程调试连接到另一台计算机的iOS设备 - remote debugging an iOS device connected to another computer 使用lldb在iOS设备上进行dylib远程调试 - dylib remote debugging on an iOS device with lldb Safari 远程调试拿起设备但不显示任何元素 - Safari Remote Debugging picking up device but not showing any elements 更新到ios8.3后丢失了Safari远程调试 - Lost safari remote debugging after update to ios8.3
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM