jrendel / SwiftKeychainWrapper

A simple wrapper for the iOS Keychain to allow you to use it in a similar fashion to User Defaults. Written in Swift.
MIT License
1.59k stars 340 forks source link

error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'SwiftKeychainWrapper') #124

Closed ferrerod closed 4 years ago

ferrerod commented 5 years ago

Running pod spec lint on MySecurity podspec file now fails with unsupported SWIFT_VERSION. I'm using cocoapods version 1.5.3 MySecurity depends on SwiftKeychainWrapper 3.2.0 I'm still using Xcode 10.1 due to other pods. After SwiftKeychainWrapper 3.3.0 release, now linting MySecurity.podspec fails so I can't push MySecurity.podspec to my private specs repo.

Even in MySecurity/Podfile I have a hook setup to specify 4.2: config.build_settings['SWIFT_VERSION'] = '4.2'

but the error persists...

bundle exec pod spec lint --verbose MySecurity.podspec ... -> Installing SwiftKeychainWrapper (3.2.0)

Copying SwiftKeychainWrapper from /Users/Develop/Library/Caches/CocoaPods/Pods/Release/SwiftKeychainWrapper/3.2.0-82c4c to ../../../../../private/var/folders/ht/d5txmlq91s53r1p4jp35cjkh0000gn/T/CocoaPods-Lint-20190510-34397-1qjduu0-MySecurity/Pods/SwiftKeychainWrapper

Build settings from command line:
    CODE_SIGN_IDENTITY = -
    SDKROOT = iphonesimulator12.1

note: Using new build system

** CLEAN SUCCEEDED **

note: Using new build system
note: Planning build
note: Constructing build description
Build system information
error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'SwiftKeychainWrapper')

Build system information
error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'SwiftKeychainWrapper')

Build system information
warning: Skipping code signing because the target does not have an Info.plist file. (in target 'App')

** BUILD FAILED **
ferrerod commented 5 years ago

I believe this is related: https://github.com/CocoaPods/CocoaPods/issues/8764

Symaxion commented 5 years ago

Can confirm this issue is not unique to CocoaPods, get the same error on Carthage.

Using XCode 10.1 on macOS 10.13.

ferrerod commented 5 years ago

I cross posted on cocoapods gh issues - pod lint and spec lint seem to create some trouble and not just this pod. Diff between one that did and didn’t showed SwiftKeychainWrapper pod had a inherit swift_options (?) clause. I wonder if it is due to SwiftKeychainWrapper lacking a spec.swift_versions = ... in its Podspec file. It really should imo.

ferrerod commented 5 years ago

The podspec with a new version number 3.3.4(?), and the swift_version specified should be published to cocoapods and that should resolve this issue.

jrendel commented 5 years ago

I've pushed these changes to CocoaPods as version 3.4.0 so you should be able to update now.