Closed chunxige closed 6 years ago
yes , I import the framework in Objective-C project, it cannot use
As the name represents, GzipSwift is for Swift. Therefore, I don't recommend to use GzipSwift in ObjC project.
However, if you yet want to use GzipSwift in Objective-C for some reason, You need to add a bridge code to use Swift.Data methods in NSData, something like this:
import Gzip
public extension NSData {
@objc func gunzippedData() -> NSData? {
return (try? (self as Data).gunzipped()) as NSData?
}
@objc func gzippedData() -> NSData? {
return (try? (self as Data).gzipped()) as NSData?
}
}
What's the OC project? Objective-C?