问题
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:
- I first created a file
.swift-version
and its content set to3.0
- 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