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

前端之家收集整理的这篇文章主要介绍了CocoaPods – 使用Xcode-beta为iOS 9 / Swift 2构建前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个“ CocoaPod”(术语?),目前版本为1.1.

还有一个repo的开发分支需要Swift 2.0(因此需要IOS 9.0的基本SDK)和PodSpec,如下所示:

@H_404_4@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相关文章