1
Size: a a a
PP
if let agentPath = chosenBinary() {
do {
let result = try Data(contentsOf: agentPath)
print(String(data: result, encoding: .utf8))
} catch {
print(error.localizedDescription)
}
}
...
func chosenBinary() -> URL? {
let dialog = NSOpenPanel();
dialog.title = "Choose the agent binary";
dialog.showsResizeIndicator = true;
dialog.showsHiddenFiles = false;
dialog.allowsMultipleSelection = false;
dialog.canChooseDirectories = false;
if (dialog.runModal() == NSApplication.ModalResponse.OK) {
return dialog.url
}
return nil
}
e couldn’t be opened because you don’t have permission to view itъясните пожалуйста как это работает или где почитать
Об
G
FI