DeviceKit icon indicating copy to clipboard operation
DeviceKit copied to clipboard

CocoaPods instruction for Swift 3.0 in README doesn't work

Open dennisweissmann opened this issue 10 years ago • 9 comments

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:in run' /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:in load' /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! 🙏

dennisweissmann avatar Sep 10 '16 22:09 dennisweissmann

update cocoapods, try add this line to DeviceKit.podspec

s.pod_target_xcconfig = { 'SWIFT_VERSION' => '3.0' }

nyssance avatar Sep 14 '16 07:09 nyssance

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.

francocorreasosa avatar Sep 14 '16 21:09 francocorreasosa

Not working in Xcode GM seed, [!] Unable to satisfy the following requirements:

  • DeviceKit (~> 1.0) required by Podfile

phiren avatar Sep 15 '16 06:09 phiren

same issue as @phiren, any suggestions on how to fix?

pxrne avatar Sep 15 '16 13:09 pxrne

Yep, same issue as @phiren too, hopefully there is a fix soon...

dickyj avatar Sep 16 '16 02:09 dickyj

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 :)

dennisweissmann avatar Sep 16 '16 19:09 dennisweissmann

It's working now, thanks! 📱

francocorreasosa avatar Sep 16 '16 19:09 francocorreasosa

Perfect! 🎉 Thank you all for your patience! 🙏

dennisweissmann avatar Sep 16 '16 19:09 dennisweissmann

Thank you too. DeviceKit is awesome!

francocorreasosa avatar Sep 16 '16 20:09 francocorreasosa