Fix compilation with CocoaPods#157
Merged
Merged
Conversation
Previously, CocoaPods would use the .swift-version file to specify the Swift version of a project when validating the podspec, but not when installing the pod. The new swift_version attribute added in CocoaPods 1.4.0 provides a Swift version to be used by the installed pod.
Swift 4 does not allow internal values to be used as default parameter values for public functions. While the project is still configured to build with Swift 3.2, this change should allow for building with Swift 4.0 if a build tool (such as CocoaPods) doesn't respect the project's specified Swift version.
Codecov Report
@@ Coverage Diff @@
## hotfix #157 +/- ##
=======================================
Coverage 95.74% 95.74%
=======================================
Files 6 6
Lines 470 470
Branches 30 30
=======================================
Hits 450 450
Misses 20 20
Continue to review full report at Codecov.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since the release of Xcode 9, CocoaPods has been building OneTimePassword with Swift 4, even though it should be compiled with Swift 3.2, leading to compilation errors (see #152). Apparently, CocoaPods uses the version of Swift defined in the
.swift-versionfile when validating a podspec, but not when installing the pod.This PR fixes #152 in two different ways:
swift_versionattribute (added in CocoaPods 1.4.0) indicates the pod should be built with Swift 3.2.Token.defaultNameandToken.defaultIssuerconstants protects against build errors in the case where CocoaPods mistakenly uses Swift 4 again.This PR also bumps the project version number to 3.0.1, in preparation for a new release.