CocoaPods-使用Xcode-beta为iOS 9/Swift 2构建 [英] CocoaPods - build for iOS 9 / Swift 2 with Xcode-beta
问题描述
我有一个当前版本为1.1的"CocoaPod"(术语?).
I have a "CocoaPod" (terminology?) that's currently at version 1.1.
回购中还有一个 develop 分支,该分支需要Swift 2.0(因此需要IOS 9.0的基本SDK)和PodSpec,如下所示:
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
在使用Xcode 8.3构建PodSpec时,PodSpec无法验证(pod spec lint
).如何强制它使用最新的Xcode-beta?
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?
推荐答案
您可以在Xcode首选项位置"选项卡中轻松更改命令行工具版本,并将命令行工具"更改为Xcode 7.0.
You can easily change the Command-Line tools version in the Xcode Preferences "Locations" tab, and change "Command Line Tools" to Xcode 7.0.
这应该可以解决"pod lib lint"问题.
This should do the trick with "pod lib lint".
这篇关于CocoaPods-使用Xcode-beta为iOS 9/Swift 2构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!