如何解决/解决“信号强度查询返回的错误"; Xcode 10.1/iOS 12.1中出现的日志? [英] How to troubleshoot/resolve "Signal strength query returned error" logs that are appearing in Xcode 10.1/iOS 12.1?

查看:416
本文介绍了如何解决/解决“信号强度查询返回的错误"; Xcode 10.1/iOS 12.1中出现的日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近更新到iOS 12.1(从12.0开始),Xcode 10.1(从10.0开始),并且在如下所示的物理设备上调试时,在Xcode控制台中看到大量错误消息:

Recently updated to iOS 12.1 (from 12.0), Xcode 10.1 (from 10.0) and seeing a flood of error messages in the Xcode console when debugging on my physical device like the following:

[NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", descriptor: <CTServiceDescriptor 0x28051d700, domain=1, instance=1>

每隔几秒钟我就会收到几个这样的日志,唯一改变的是CTServiceDescriptor的十六进制值.没有代码更改,因此我必须假定其与iOS或Xcode更新有关.

I get a couple of these logs every couple seconds, the only thing that changes is the hex value for the CTServiceDescriptor. There have been no code changes so I have to assume its related to the iOS or Xcode updates.

据我所知,它似乎没有任何性能影响,该应用程序正在按预期运行,并且我的手机正在运行(它甚至在更新其信号强度!).我在Stack Overflow,Google或Apple Developer论坛上找不到任何有用/相关的信息,尽管我发表了与后者类似的帖子,一旦该帖子获得批准,我将在此处链接.

As far as I can tell it doesn't appear to have any performance impact, the app is operating as expected and my phone is working (its even updating its signal strength!). I've been unable to find anything helpful/relevant across Stack Overflow, Google, or the Apple Developer forums though I made a similar post to the latter that I'll link here once the post is approved.

对于我如何进一步解决或解决问题的任何建议/见解,我们将不胜感激.谢谢!

Any suggestions/insight into how I could troubleshoot this further or resolve would be greatly appreciated. Thanks!

推荐答案

在较新的iOS版本中调用[CTTelephonyNetworkInfo new];似乎是一种副作用,我认为可以放心地忽略它.我不确定应用程序开发人员是否可以解决此问题,这似乎是副作用,在最新版本的iOS(9+)中,CTTelephonyNetworkInfo中的signalStrength隐藏在公共应用程序中.这并不是什么新鲜事,但在iOS 12.1(可能是其他版本?)下,这里的权限错误却比较嘈杂.

It seems to be a side-effect of calling [CTTelephonyNetworkInfo new]; under newer versions of iOS and can be safely ignored, I think. I'm not sure there's anything app developers can do to fix this, it appears to be a side-effect that signalStrength inside CTTelephonyNetworkInfo is hidden from public apps in recent versions of iOS (9+). This is nothing new, but it's noisier about the permissions error here under iOS 12.1 (maybe other versions?).

CTTelephonyNetworkInfo似乎是一个经过快速修订的API,至少供公众使用:例如,当返回v12.1中已修复的运营商信息时,它在v12中存在错误. 为什么serviceSubscriberCellularProviders返回nil? (在iOS 12中)

CTTelephonyNetworkInfo appears to be a hastily-revised API, for public use at least: For example, it had bugs in v12 when returning carrier info that was fixed in v12.1. why do serviceSubscriberCellularProviders return nil? (in iOS 12)

我还想起了macOS控制台日志中经常出现的无关权限错误-

I'm also reminded of the extraneous permissions errors that appear frequently in macOS console logs - https://eclecticlight.co/2016/09/23/sierras-console-promising-but-incomplete/ - or the Xcode 8 bug where in an early beta the Simulator was extremely noisy. Sometimes the internal chatter slips out to an external release, and there's not much anyone outside Apple can do about it...

这篇关于如何解决/解决“信号强度查询返回的错误"; Xcode 10.1/iOS 12.1中出现的日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆