UTTypeCreatePreferredIdentifierForTag and CFStringRef in Swift

Question or problem in the Swift programming language: import Foundation import MobileCoreServices func checkFileExtension(fileName: NSString){ println(fileName) var fileExtension:CFStringRef = fileName.pathExtension println(fileExtension) var fileUTI:CFStringRef = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, fileExtension, nil) println(fileUTI) let testBool = UTTypeConformsTo(fileUTI, kUTTypeImage) != 0 if testBool{ println(“image”) } } I get this error at line any ideas ?? Thanks How to solve the problem: […]

Continue Reading