CocoaPods - build for iOS 9 / Swift 2 with Xcode-beta

雨燕双飞 提交于 2019-12-12 08:32:59

问题


I have a "CocoaPod" (terminology?) that's currently at version 1.1.

There's also a develop branch of the repo that requires Swift 2.0 (so needs a base SDK of IOS 9.0) with a PodSpec as follows:

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

The PodSpec fails to validate (pod spec lint) as it builds using Xcode 8.3. How do I force it to use the latest Xcode-beta?


回答1:


You can easily change the Command-Line tools version in the Xcode Preferences "Locations" tab, and change "Command Line Tools" to Xcode 7.0.

This should do the trick with "pod lib lint".



来源:https://stackoverflow.com/questions/30804866/cocoapods-build-for-ios-9-swift-2-with-xcode-beta

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!