native
native copied to clipboard
Provide convenience utilities for toll-free bridging
It would be nice to have convenience constructors to support toll-free bridging, rather than having to extract and cast pointers. E.g., an NSString(ffi.Pointer<__CFString> cf) for strings, and similarly for other common bridged types.
String is especially useful since there are a bunch of constants that are only defined as CFStrings in Apple's headers, and the standard Obj-C idiom is to just cast them as you use them.