i'm tying to create a custom LDAP configuration in a swift script, something similar to this without using python: https://github.com/Yohan460/Programmatic-OD-Python-Binding
my script fails at the custom call - not sure if the issue is my data types or that the functions used in the python example don't exactly translate. any help is appreciated, thanks in advance! p.s - i'm a total swift n00b
#!/usr/bin/swift
import Foundation
import OpenDirectory
let fileName = "ldap.plist"
let configData = try String(contentsOfFile: fileName)
let config = Data(configData.utf8)
let odSesh = ODSession.default()
let configNode = try! ODNode(session: odSesh,type: ODNodeType(kODNodeTypeConfigure))
let outNode = try! configNode.customCall(99991, send: config)