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' => '[email protected]'
  }
  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”相结合.

相关文章

UITabBarController 是 iOS 中用于管理和显示选项卡界面的一...
UITableView的重用机制避免了频繁创建和销毁单元格的开销,使...
Objective-C中,类的实例变量(instance variables)和属性(...
从内存管理的角度来看,block可以作为方法的传入参数是因为b...
WKWebView 是 iOS 开发中用于显示网页内容的组件,它是在 iO...
OC中常用的多线程编程技术: 1. NSThread NSThread是Objecti...