honghaoz / Ji

Ji (戟) is an XML/HTML parser for Swift
MIT License
824 stars 65 forks source link

Add CoreFoundation import #54

Closed nikstar closed 5 years ago

nikstar commented 5 years ago

Hi! Compiling Ji on Linux failed with multiple errors

error: use of unresolved identifier 'CFStringConvertNSStringEncodingToEncoding'
    let cfEncoding = CFStringConvertNSStringEncodingToEncoding(encoding.rawValue)
error: use of undeclared type 'CFString'
    let cfEncodingAsString: CFString = CFStringConvertEncodingToIANACharSetName(cfEncoding)

and so on.

Adding explicit import CoreFoundation solved this issue.

honghaoz commented 5 years ago

Cool! Thanks!