CocoaPods instruction for Swift 3.0 in README doesn't work
The CocoaPods instruction
pod 'DeviceKit', '~> 1.0'
doesn't work.
This is due to a bug in CocoaPods ... I currently cannot submit any new versions to the CocoaPods trunk because it doesn't lint. The error I get is:
=== CLEAN TARGET DeviceKit OF PROJECT Pods WITH CONFIGURATION Release ===
Check dependencies “Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for >targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
** CLEAN FAILED **
The following build commands failed: Check dependencies (1 failure) === BUILD TARGET DeviceKit OF PROJECT Pods WITH CONFIGURATION Release ===
Check dependencies “Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
** BUILD FAILED **
The following build commands failed: Check dependencies (1 failure) -> DeviceKit (1.0.0) - ERROR | xcodebuild: Returned an unsuccessful exit code.
Analyzed 1 podspec.
[!] The spec did not pass validation, due to 1 error.
/Users/dennis/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.0.rc.1/lib/cocoapods/command/spec/lint.rb:77:in
run' /Users/dennis/.rvm/gems/ruby-2.3.1@global/gems/claide-1.0.0/lib/claide/command.rb:334:inrun' /Users/dennis/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.0.rc.1/lib/cocoapods/command.rb:50:inrun' /Users/dennis/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.0.rc.1/bin/pod:55:in<top (required)>' /Users/dennis/.rvm/gems/ruby-2.3.1/bin/pod:23:inload' /Users/dennis/.rvm/gems/ruby-2.3.1/bin/pod:23:in' /Users/dennis/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in eval' /Users/dennis/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in'
SWIFT_VERSION is set to 3.0.
If anyone has any insights on this and knows how to work around please let me know! Thanks! 🙏
update cocoapods, try add this line to DeviceKit.podspec
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '3.0' }
Same here:
Analyzing dependencies
[!] Unable to satisfy the following requirements:
- `DeviceKit (~> 1.0)` required by `Podfile`
None of your spec sources contain a spec satisfying the dependency: `DeviceKit (~> 1.0)`.
You have either:
* out-of-date source repos which you can update with `pod repo update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
Not working in Xcode GM seed, [!] Unable to satisfy the following requirements:
DeviceKit (~> 1.0)required byPodfile
same issue as @phiren, any suggestions on how to fix?
Yep, same issue as @phiren too, hopefully there is a fix soon...
Sorry for joining so late, somehow I didn't get mail notifications ...
There is a fix! https://github.com/CocoaPods/CocoaPods/issues/5864#issuecomment-247109685
I've just published 1.0 via CocoaPods, it should work now :)
It's working now, thanks! 📱
Perfect! 🎉 Thank you all for your patience! 🙏
Thank you too. DeviceKit is awesome!