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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16999186/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 23:50:10  来源:igfitidea点击:

Why Safari shows "No Inspectable Applications" during remote debugging with iOS 6 device?

iosiphoneipadsafariweb-inspector

提问by Easwaramoorthy K

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?

为什么会发生这种情况?

采纳答案by Easwaramoorthy K

If you have private browsing enabled in Settings > Safari, you will not be able to use remote debugging. If you turned off private browsing, it will work like a charm.

如果您在 中启用了隐私浏览Settings > Safari,您将无法使用远程调试。如果您关闭隐私浏览,它会像魅力一样工作。

回答by Steve Seeger

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]

I also needed to re-connect the iPhone after changing this setting

在您的移动设备上的设置 -> Safari -> 欺诈网站警告 = 关闭 [默认 = 开启]

更改此设置后,我还需要重新连接 iPhone

This solved it for me.

这为我解决了它。

回答by derrylwc

I recently had problems debugging a UIWebView in desktop Safari – and it turns out the problem was with my Xcode configuration for the app. 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 中调试 UIWebView 时遇到问题 - 结果证明问题出在我的 Xcode 配置上。最新的构建已被配置用于生产,而不是用于测试。重新构建应用程序进行测试后,它再次出现在 Safari 调试菜单中:-)

回答by Gil Epshtain

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). If you've done this you will see your device in Safari >> Develop. if you see your device but you don't see your application under it, instead "no inspectable application", check your Xcode settings.

首先确认您在设备上启用了 Safari 调试器(在设备上转到:Settings >> Safari >> Advanced >> Enable Debug;或 iOS 9+ 开启:)Settings >> Safari >> Advanced >> Web Inspector。如果您已完成此操作,您将在 Safari >> 开发中看到您的设备。如果您看到您的设备,但在其下方没有看到您的应用程序,而是“ 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.

请注意,更改代码签名将阻止您发布用于生产的版本,但是您将能够调试您的应用程序。

回答by Dunc

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

  2. Quit/reopen Safari on the Mac

  3. Unplug/plug back in iOS device

  1. 在您的 iPhone/iPad 上,双击主页按钮以显示正在运行的应用程序列表,关闭 Safari(或相应的 Web 应用程序),然后重新打开

  2. 在 Mac 上退出/重新打开 Safari

  3. 拔下/重新插入 iOS 设备

As a side note, I canattach to Safari with private browsing enabled on the iOS device.

作为旁注,我可以在 iOS 设备上启用隐私浏览的情况下附加到 Safari。

回答by macio.Jun

If you just installed XCode 9, do not forget to install Safari 11, or you will see "no inspecable applications"

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

回答by Emmanuel Harguindey

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. Updating to Sierra, solved the problem.

就我而言,我有 Safari 10.0.2,在 El Capitan 上运行,当尝试在模拟器 (iphone 7) 上运行应用程序时,我什至在 Safari 的开发菜单中没有模拟器选项。更新到 Sierra,解决了这个问题。

回答by Predrag Te?ovi?

I resolved the issue with rebuilding the app with new key - certificate (p12) and provisioning profile. My developer account and certificates expired, so it just stopped recognizing my PhoneGap app in Developer menu.

我解决了使用新密钥重建应用程序的问题 - 证书 (p12) 和配置文件。我的开发人员帐户和证书已过期,因此它在“开发人员”菜单中停止识别我的 PhoneGap 应用程序。

回答by Mohamed Ramrami

I had the same problem with Safari 11.0.3 on High Sierra. The only think that worked for me is installing Safari Technology Previewfrom here.

我在 High Sierra 上使用 Safari 11.0.3 遇到了同样的问题。唯一对我有用的想法是从这里安装Safari Technology Preview

回答by AjLearning

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. Instead, running the following worked:

我试图通过 iOS 模拟器让它工作,但前面提到的答案都没有奏效,即使我都试过了。相反,运行以下工作:

npm install -g ios-sim

After that, once I started the application, the simulator appeared under the Developmenu on Safari.

之后,一旦我启动了应用程序,模拟器就会出现在DevelopSafari的菜单下。