Thanks @winzosahil, this works great:
// Cast the handle to the correct type (e.g., UnsafePointer)
let machineHeader = #dsohandle.assumingMemoryBound(to: MachHeader.self) ufw!.setExecuteHeader(machineHeader)
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: