【问题标题】:Creating a cocoapod创建一个可可足类
【发布时间】:2015-10-31 13:08:31
【问题描述】:

我开发了一个小型库,我想为它创建一个 Cocoapod。问题是每当我运行script pod spec lint xxx.podspec --verbose --no-clean --use-libraries 我得到了

  • 错误 | [iOS] 未知:在验证过程中遇到未知错误(用 Swift 编写的 Pod 只能集成为框架;将 use_frameworks! 添加到您的 Podfile 或目标以选择使用它。正在使用的 Swift Pod 是:Socialite)。李>

我正在使用 pod lib create xxx 制作库

【问题讨论】:

  • 我从未将 pod lib create 用于 swift pod。请参考 Alamofire 的设置,这应该是 swift pod 应该如何的一个很好的例子:github.com/Alamofire/Alamofire

标签: ios swift cocoapods


【解决方案1】:

您不能将--use-libraries 与 Swift pod 一起使用,因为它们必须是框架。如果你删除它 - 它会运行 linter。

【讨论】:

  • 如果我删除--use-libraries,我会得到以下内容:- ERROR | [iOS] unknown: Encountered an unknown error (The 'Pods' target has transitive dependencies that include static binaries: (/private/var/folders/wx/r2p4ty_n0js19g0vc88p589w0000gn/T/CocoaPods/Lint/Pods/Fabric/Fabric.framework, /private/var/folders/wx/r2p4ty_n0js19g0vc88p589w0000gn/T/CocoaPods/Lint/Pods/TwitterCore/TwitterCore.framework, and /private/var/folders/wx/r2p4ty_n0js19g0vc88p589w0000gn/T/CocoaPods/Lint/Pods/TwitterKit/TwitterKit.framework)) during validation.
  • 如果我删除 's.dependency 'TwitterCore' s.dependency 'TwitterKit' s.dependency 'Fabric'' .podspec 将通过验证。
  • 是的,Twitter 需要发布其库的动态框架版本。恐怕 CocoaPods 无法链接传递静态依赖项。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多