“Use Legacy Swift Language Version” (SWIFT_VERSION) Error When Publishing Cocoapods

送分小仙女□ 提交于 2020-01-06 04:12:28

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/39522139/use-legacy-swift-language-version-swift-version-error-when-publishing-cocoap

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