发布Cocoapods时出现“使用旧版Swift语言版本”(SWIFT_VERSION)错误 [英] “Use Legacy Swift Language Version” (SWIFT_VERSION) Error When Publishing Cocoapods

查看:95
本文介绍了发布Cocoapods时出现“使用旧版Swift语言版本”(SWIFT_VERSION)错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将此库 https://github.com/ankurp/Dollar 发布到cocoapods使用以下命令 pod trunk push Dollar.podspec --allow-warnings --verbose 并得到以下错误,这阻止了将库发布到cocoapods。没有构建错误,所有测试都通过了我的本地和Travis CI。 https://travis-ci.org/ ankurp / Dollar



我最近将项目升级为使用Swift 3语法,还将该项目更新为我们SWIFT_VERSION = 3 https://github.com/ankurp/Dollar/commit/190ba262eac738efd09408a12a433a68cc51d735 仍然遇到尝试发布的问题。 >

是否有人遇到过同样的问题,即升级到Swift 3并使用Xcode 8后,他们无法发布Swift Cocoapods。

解决方案

所以我这样解决了发布问题:


  1. 我首先创建了一个文件 .swift-version ,其内容设置为 3.0

  2. 然后我安装了以下版本发布 1.1.0.rc.2
  3. $ b $之前的cocoapods b


I am trying to publish this library https://github.com/ankurp/Dollar to cocoapods using the following command pod trunk push Dollar.podspec --allow-warnings --verbose and getting the following error which is preventing the publishing of the library to cocoapods. There is no build errors and all tests pass on my local and Travis CI https://travis-ci.org/ankurp/Dollar

I recently upgraded the project to use Swift 3 syntax and also updated the project to us SWIFT_VERSION=3 https://github.com/ankurp/Dollar/commit/190ba262eac738efd09408a12a433a68cc51d735 but still running into issues trying to publish.

Has anyone run into this same issue where they cannot publish a Swift cocoapods after upgrading to Swift 3 and using Xcode 8.

解决方案

So I solved the publishing issue as such:

  1. I first created a file .swift-version and its content set to 3.0
  2. Then I installed the following version of cocoapods before publishing 1.1.0.rc.2

这篇关于发布Cocoapods时出现“使用旧版Swift语言版本”(SWIFT_VERSION)错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆