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

我有一个“ CocoaPod”(术语?),目前版本为1.1.

还有一个repo的开发分支需要Swift 2.0(因此需要IOS 9.0的基本SDK)和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在使用Xcode 8.3构建时无法验证(pod spec lint).如何强制它使用最新的Xcode-beta?

解决方法

您可以在Xcode首选项“位置”选项卡中轻松更改命令行工具版本,并将“命令行工具”更改为Xcode 7.0.

这应该与“pod lib lint”相结合.

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...