【问题标题】:CocoaPods - build for iOS 9 / Swift 2 with Xcode-betaCocoaPods - 使用 Xcode-beta 为 iOS 9 / Swift 2 构建
【发布时间】:2015-08-28 13:40:24
【问题描述】:

我有一个当前版本为 1.1 的“CocoaPod”(术语?)。

还有一个 develop 分支需要 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?

【问题讨论】:

    标签: cocoapods beta swift2 ios9 xcode7


    【解决方案1】:

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

    这应该使用“pod lib lint”来解决问题。

    【讨论】:

    • 如果您想发布屏幕截图的链接,我们可以为您编辑。
    猜你喜欢
    • 1970-01-01
    • 2015-09-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多