【问题标题】:How to install Objective C GZIP library for Swift如何为 Swift 安装 Objective C GZIP 库
【发布时间】:2017-11-29 11:29:13
【问题描述】:

我在当前项目中使用 Xcode 9.1 和 Swift 3.2。 我尝试使用 1024jp 的 GzipSwift 库,但我不断收到clang: error: linker command failed with exit code 1 (use -v to see invocation)

所以我决定试试 Objective C 版本。

这是用 Objective C 库 https://github.com/nicklockwood/GZIP 编写的 GZIP。

Alternatively you can use Carthage, or if you prefer to install manually, drag the GZIP.xcodeproj into your project or workspace and include GZIP.framework under the linked libraries in your target.

我不知道如何使用 Carthage,也不知道如何拖动 GZIP.xcodeproj(我应该将它拖到项目的哪个位置?),而且我也找不到 GZIP.framework 文件。

我尽量避免使用 Cocoapods,因为过去我工作的地方证明它很麻烦。

【问题讨论】:

    标签: objective-c swift xcode gzip carthage


    【解决方案1】:

    有关如何嵌入框架,请参阅以下 Apple 文档:

    https://developer.apple.com/library/content/technotes/tn2435/_index.html

    您可能还想考虑使用 Apple 的数据压缩 API,请参阅 https://developer.apple.com/documentation/compression/data_compression。在其他算法中,它支持 GZIP 使用的 ZLIB,请参阅How are zlib, gzip and zip related? What do they have in common and how are they different?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-09-25
      • 2011-05-11
      • 1970-01-01
      • 1970-01-01
      • 2016-08-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多