Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to troubleshoot/resolve "Signal strength query returned error" logs that are appearing in Xcode 10.1/iOS 12.1?

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>

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.

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!

like image 320
Phil Avatar asked Nov 28 '18 18:11

Phil


1 Answers

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 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)

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...

like image 119
Louis St-Amour Avatar answered Nov 11 '22 06:11

Louis St-Amour