0

我有一个试图推送到 CocoaPods 主干的库,但它不会针对 iOS 7 SDK 进行 lint,因为它包含 iOS 8 API 调用。

将 podspec 的版本更改为 8.0 没有任何效果,并且 linter 尝试针对 7.1 进行构建,但失败了。如何将 cocoapods linter 更改为针对 iOS 8 beta 的 lint?

编辑

pod trunk push my.podspec使用该选项运行命令--verbose并在日志中看到:

=== 使用默认配置(发布)构建目标 Pods-MBPlacePickerController 的项目 Pods ===

检查架构“arm64”和变体“正常”的依赖项 iOS 部署目标“8.0”大于 > iOS 7.1 SDK 的最大值“7.1.99”。

这是我的 podspec:

Pod::Spec.new do |s|

  s.name         = "MBPlacePickerController"
  s.version      = "2.2.2"
  s.summary      = "An open source place picker for iOS."
  s.description  = <<-DESC
    A view controller for picking a location. I wrote it to be a simple wrapper around automatic location detection, but also to offer manual location selection in case GPS isn't available.
                   DESC
  s.homepage     = "https://github.com/MosheBerman/MBPlacePickerController"
  s.screenshots  = "https://raw.github.com/MosheBerman/MBPlacePickerController/master/screens/2.2.0/Readme/Default-Dark.png"
  s.author       = { "Moshe Berman" => "moshberm@gmail.com" }
  s.license      = 'MIT'
  s.platform     = :ios, '8.0'
  s.source       = { :git => "https://github.com/MosheBerman/MBPlacePickerController.git", :tag => "2.2.2"} 
  s.source_files  = 'Classes', 'MBPlacePickerController/MBPlacePickerController/**/*.{h,m}'
  s.frameworks = 'QuartzCore'
  s.weak_framework = 'CoreLocation'
  s.requires_arc = true
end
4

1 回答 1

2

您将希望在 pod 规范中包含以下行:

s.platform = :ios, '8.0'

8.0 指的是部署目标,所以只有部署目标是 iOS 8.0 时,其他开发者才能通过 CocoaPods 使用你的库。

此外,由于 iOS 8.0 仍处于测试阶段,因此 Xcode 6 也处于测试阶段,因此您需要运行以下命令:

sudo xcode-select --switch /Applications/Xcode6-Beta5.app/Contents/Developer
于 2014-08-10T01:34:54.267 回答