in deployment/macos/diagnostic/SystemExtensionTester/TestSystemExtension/IPCConnection.swift [87:109]
func queryFullDiskAccessFromSystemExtension(completionHandler: @escaping (Bool) -> Void) {
// Guard nil connection
guard self.currentConnection != nil else {
completionHandler(false)
return
}
guard let providerProxy = self.currentConnection?.remoteObjectProxyWithErrorHandler({
error in
os_log("Unable to communicate with system extension: %@", error.localizedDescription)
self.currentConnection?.invalidate()
self.currentConnection = nil
completionHandler(false)
}) as? ProviderCommunication else {
os_log("Unable to communicate with system extension")
completionHandler(false)
return
}
providerProxy.attemptFullDiskAccess(completionHandler)
}