I\'m trying to write a program that will scan for available serial ports and present them in a popup menu. Why can I not take the CFString
straight from the
As for me, I like to make extentions and use them afterwards. It seems convenient and clear to read:
Extention:
extension CFString {
var string: String {
return self as String
}
}
Usage:
let specificQueryPart: [String: NSObject] = [
kSecReturnData.string: true as NSObject,
kSecAttrService.string: key as NSObject,
kSecMatchLimit.string: kSecMatchLimitOne
]