Im getting the error in the title when I run my app. I am running Xcode Beta 10 Version 6. The full error is:
[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.}
It gets thrown in my createTaskFromSnapshot() function, on the first line of the function.
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?