- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我有一个 Objective-C 库,我正在尝试将 podspec 更新为 cocoapods。当我执行“pod spec lint”命令时,出现以下错误:
[!] The spec did not pass validation, due to 1 error.
[!] The validator for Swift projects uses Swift 3.0 by default, if you are using a different version of swift you can use a `.swift-version` file to set the version for your Pod. For example to use Swift 2.3, run:
`echo "2.3" > .swift-version`.
这是我的 podspec 文件:
Pod::Spec.new do |s|
s.name = "OSwitch"
s.version = "0.2.0"
s.license = { :type => "MIT", :file => "LICENSE" }
s.summary = "OSwitch is a customisable switch control writen in Objective C."
s.homepage = 'https://github.com/OyaSaid/OSwitch'
s.source = { :git => 'https://github.com/OyaSaid/OSwitch.git', :tag => s.version.to_s }
s.platform = :ios, "7.0"
s.ios.frameworks = ['UIKit', 'Foundation']
s.source_files = 'OSwitch/Classes/**/*.{h,m}'
s.requires_arc = true
end
为什么当我有一个 Objective-C 库时会显示此信息。我该如何解决这个问题?
谢谢
最佳答案
它表明,因为您可以在 pod 中同时使用 swift 和 Objc 语言。只需在终端中运行以下命令:
`echo "2.3" > .swift-version`
在 XCode 中将“2.3”替换为您当前的 Swift 版本,例如,如果您使用的是 3.1,请将其替换为“3.1”。它将在您的 pod-project 文件夹中创建一个 swift 版本文件。然后您可以运行 lint 命令来验证您的 podspec。
关于objective-c - Cocoapods 的 Lint 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40634963/
有没有办法在 CocoaPod 文件中写入注释?我看了他们的CocoaPods Guide ,但我什么也没看到。 最佳答案 您可以使用 Ruby 注释语法在 Podfile 中添加注释: 内联 #co
我在 Xcode 项目中有多个目标,它们必须依赖于相同的 pod 列表。我可以这样写 Podfile: target :target1 do pod 'pod1' pod 'pod2'
我正在创建一个新的 cocoapod,并希望包含另一个 cocoapod 作为依赖项。 我在 podspec 中添加了必要的行: s.dependency 'Locksmith', '~> 2.0
我执行了我的正常 pod update并收到以下消息: [!] There was an error reading '~/.cocoapods/repos/master/CocoaPods-vers
背景 几年前,我为我正在从事的项目安装了 cocoapods。从那以后我就没有使用过它,现在我需要更新它才能让 Flutter 工作。 系统 操作系统 MacOS Mojave 版本 10.14.3
我想知道用 CocoaPod 包含演示项目的最佳方法是什么。特别是,我希望它成为任何人都可以尝试使用 pod try 的组件。命令。 我看到两个选项: 选项 1:使用 Podfile 在 Exampl
我正在尝试为 firebase 获取一个 pod,但是我在搜索框中输入的任何名称都没有返回任何内容。是网站打不开还是?谢谢 最佳答案 这似乎是许多开发人员不时面临的问题,包括我自己,但是 cocoap
我有一个库的公共(public)分支,该库已存在于 CocoaPods/Specs 中。在 Podfile 中,我可以通过执行以下操作来引用此 fork pod: pod 'CoolLibrary',
pod 命令是否支持列出给定项目中已安装的 CococaPods 的选项? pod list 似乎显示了所有已发布 pod 的列表。我查看了文档,但找不到执行此操作的方法。 最佳答案 如 @DougA
我在 Amazon s3 中存储了一个预编译的框架。 “pod spec lint”失败并出现以下错误。 - ERROR | [iOS] file patterns: The `source_file
我正在用一些资源文件创建我自己的 pod。它基本上是这样定义的: Pod::Spec.new do |s| s.name = 'MyName' s.version = '0.
我正在尝试在我的项目中使用编译到 iOS 的 libFLAC,并使用 CocoaPod 作为依赖项进行安装。 问题是,如果我使用 CocoaPod 0.39 版,工作区创建得很好,但如果我使用 Coc
我在使 CocoaPods 依赖项在 RubyMotion 中工作时遇到了各种问题。首先,如果我添加 dependency 'JSONKit'到我的 Rakefile 然后运行 rake它被 ca
当使用 faSTLane 和 cocoapods 构建我们的 iOS 应用程序时,我注意到 faSTLane 不使用我使用安装的 cocoapods 版本 sudo gem install cocoa
有没有办法在 Podfile 中指定那个 xcconfig文件应该是 #include d 在 Cocoapods 生成的那个? 是否有公开的方法/变量用于附加此 #include还是我需要阅读生成的
在新的 XCode5 中构建我的项目时,我收到以下警告: Pods-App 作为“libPods-App.a”的隐式依赖项被拒绝,因为其架构“i386”不包含所有必需的架构“x86_64” . 最佳答
我已经使用以下命令在 bundle 中安装了 Cocoapods-art: bundle exec gem install cocoapods-art 这是成功消息: Fetching cocoap
在 Xcode 7 中,cocoapods 库的库具有排除代码覆盖率的功能。 但在 Xcode 8 中,该库将包含代码覆盖率。 我是否可以在代码覆盖率中排除该库? 示例:安装 pod 'TPKeybo
我目前正在寻找一个仅支持 Carthage 作为包管理器的库。我希望将其集成的项目已经有一些 CocoaPods 依赖项。有人尝试过同时使用这两个管理器吗? 我觉得这是一个坏主意,但我很想听听实际情况
我刚刚在 Specs Repo 中使用 Pod trunk Push 发布了 Pod 的 Beta 版本。我想知道是否有任何方法可以从规范存储库中删除此版本规范。我没有找到任何通过 pod 命令执行此
我是一名优秀的程序员,十分优秀!