I'd like to work with a private macOS framework (MultitouchSupport.framework) in a swift project and got stuck at this point.
So far I get the address of the trackpad as AnyObject: <MTDevice 0x10190b600 [0x7fff877ed5b0]>
. But the methods of this framework want that first hex value as a pointer typedef void *MTDeviceRef;
argument.
The ObjC code that does what I need looks like this: MTDeviceRef device = (__bridge MTDeviceRef)[deviceList objectAtIndex:i];
I have tried converting via as! MTDeviceRef
and withUnsafePointer
with no luck.
Is there a way to convert this? I am still new to coding and swift, any help is greatly appreciated!