CocoaPods - 使用 Xcode-beta 为 iOS 9 / Swift 2 构建

8

我有一个名为"CocoaPod"的程序包(术语?),当前版本是1.1。

此外,代码库中还有一个需要Swift 2.0(因此需要基于IOS 9.0的基本SDK)的develop分支,其PodSpec如下:

Pod::Spec.new do |s|
  s.name         = 'ReachabilitySwift'
  s.version      = '2.0-beta1'
  s.homepage     = 'https://github.com/ashleymills/Reachability.swift'
  s.authors      = {
    'Ashley Mills' => 'ashleymills@mac.com'
  }
  s.summary      = 'Replacement for Apple\'s Reachability re-written in Swift with callbacks.'
  s.license      = { :type => 'MIT' }

# Source Info
  s.ios.platform = :ios, "9.0"
  s.osx.platform = :osx, "10.11"
  s.ios.deployment_target = "8.0"
  s.osx.deployment_target = "10.9"
  s.source       =  {
    :git => 'https://github.com/ashleymills/Reachability.swift.git',
    :branch => 'develop',
    :tag => 'v'+s.version.to_s
  }
  s.source_files = 'Reachability.swift'
  s.framework    = 'SystemConfiguration'

  s.requires_arc = true
end

PodSpec无法通过验证(pod spec lint),因为它是使用Xcode 8.3构建的。我该如何强制它使用最新的Xcode-beta?

1个回答

13
您可以在Xcode的“位置”选项卡中轻松更改命令行工具版本,将“Command Line Tools”更改为Xcode 7.0。这应该可以解决“pod lib lint”的问题。Command Line Tools

如果您想要发布屏幕截图的链接,我们可以为您进行编辑。 - James Webster

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接