简体   繁体   English

名为com.apple.commcenter.coretelephony.xpc的服务连接无效

[英]The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated

Im getting the error in the title when I run my app. 我运行我的应用程序时,我在标题中收到错误。 I am running Xcode Beta 10 Version 6. The full error is: 我正在运行Xcode Beta 10 Version 6.完整的错误是:

[NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 “The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.” UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} [NetworkInfo]描述符查询返回错误:错误Domain = NSCocoaErrorDomain Code = 4099“与名为com.apple.commcenter.coretelephony.xpc的服务的连接无效。”UserInfo = {NSDebugDescription =与名为com.apple.commcenter的服务的连接。 coretelephony.xpc无效。}

It gets thrown in my createTaskFromSnapshot() function, on the first line of the function. 它会在我的createTaskFromSnapshot()函数中抛出,在函数的第一行。

My code: 我的代码:

func observeDatabase(_ tableToUpdate: UITableView) {
    taskDatabase.observe(.childAdded) { (snapshot) in
        self.handleChildAdded(snapshot: snapshot)
        tableToUpdate.reloadData()
    }
}

private func handleChildAdded(snapshot: 
    let addedTask = createTaskFromSnapshot(snapshot)
    taskList.append(addedTask)
}

private func createTaskFromSnapshot(_ snapshot: DataSnapshot) -> Task {
    let snapshotValue = snapshot.value as! Dictionary<String, String> // error is thrown here

    let taskTitle = snapshotValue["taskTitle"]!
    let newTask = Task(title: taskTitle)
  return newTask
}

What does this error mean? 这个错误是什么意思? and why am I getting it? 为什么我得到它?

The message is probably unrelated to the crash/issue. 该消息可能与崩溃/问题无关。

I've had this message bother me for a while now with no way of removing it. 我有这个消息困扰我一段时间现在无法删除它。 Well I've found a way to hide this in your xcode console just run one of the following command in a terminal: 好吧,我已经找到了一种在xcode控制台中隐藏它的方法,只需在终端中运行以下命令之一:

xcrun simctl spawn booted log config --mode "level:off" --subsystem com.apple.CoreTelephony

sudo log config --mode "level:off" --subsystem com.apple.CoreTelephony

you can always re-enable this at anytime by running the same command with a different level attribute` 您可以随时通过运行具有不同level属性的相同命令来重新启用此功能

Try this: 尝试这个:

1- From Xcode menu open: Product > Scheme > Edit Scheme 1-从Xcode菜单打开:产品>方案>编辑方案

2- On your Environment Variables set OS_ACTIVITY_MODE = disable 2-在您的环境变量上设置OS_ACTIVITY_MODE =禁用

在此输入图像描述

In my case this type of warning was generated in the case when CTTelephonyNetworkInfo() was used. 在我的例子中,在使用CTTelephonyNetworkInfo()的情况下生成了这种类型的警告。 As this error only generated on simulator I did like this: 由于此错误仅在模拟器上生成,我这样做:

#if targetEnvironment(simulator)
    return []
#else
    let networkInfo = CTTelephonyNetworkInfo()
    return [networkInfo.subscriberCellularProvider]
#endif

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

相关问题 Xcode 11.1 似乎打破了 com.apple.commcenter.coretelephony.xpc - Xcode 11.1 seems to break com.apple.commcenter.coretelephony.xpc 名为com.apple.nsurlstorage-cache的服务连接无效 - The connection to service named com.apple.nsurlstorage-cache was invalidated GameCenter:“名为com.apple.gamed的服务连接被中断” - GameCenter: “The connection to service named com.apple.gamed was interrupted” 错误:启动 MKMapSnapshotter 时出现“连接到名为 com.apple.MapKit.SnapshotService 的服务” - Error: "connection to service named com.apple.MapKit.SnapshotService" when starting MKMapSnapshotter 无法在带有 ios 6.1.2 的 iphone4 上卸载 com.apple.CommCenter.plist? - Can't unload com.apple.CommCenter.plist on iphone4 with ios 6.1.2? 插件com.apple.share.Facebook.post无效 - plugin com.apple.share.Facebook.post invalidated EXC_BAD_INSTRUCTION 来自 com.apple.xpc.activity.com.apple.cloudkit.scheduler.com.apple.coredata.cloudkit - EXC_BAD_INSTRUCTION from com.apple.xpc.activity.com.apple.cloudkit.scheduler.com.apple.coredata.cloudkit.activity.export XPC 连接中断 - XPC Connection Interrupted 无法发送推文:插件com.apple.share.Twitter.post无效 - Can't send tweet anymore: plugin com.apple.share.Twitter.post invalidated 尽管“插件com.apple.share.Facebook.post无效”,但Facebook图片帖子仍然有效 - Facebook image post works despite “plugin com.apple.share.Facebook.post invalidated”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM