cocoacocoapodsaws-sdkaws-sdk-ios

How to set up the AWS SDK for Cocoa Application project?


I am trying to set up the AWS SDK for Cocoa Application project.

I created a plain text file named Podfile (without any file extension) and added the lines below:

source 'https://github.com/CocoaPods/Specs.git'

pod "AWSiOSSDKv2"
pod "AWSCognitoSync"

Then run the following command:

MacBook-abg:MyProject abg$ pod install
Analyzing dependencies

CocoaPods 0.36.0.beta.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

### Report

* What did you do?

* What did you expect to happen?

* What happened instead?


### Stack

```
   CocoaPods : 0.35.0
        Ruby : ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin12.0]
    RubyGems : 2.4.5
        Host : Mac OS X 10.8.5 (12F45)
       Xcode : 5.1.1 (5B1008)
         Git : git version 2.2.2
Ruby lib dir : /usr/local/Cellar/ruby/2.2.0/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ bf3d71817a57f19eaae3f328ca9c42857c5c6a9c
```

### Plugins

```
cocoapods-plugins : 0.3.2
cocoapods-trunk   : 0.4.1
cocoapods-try     : 0.4.3
```

### Podfile

```ruby
source 'https://github.com/CocoaPods/Specs.git'

pod "AWSiOSSDKv2"
pod "AWSCognitoSync"
```

### Error

```
Pod::StandardError - #<Pod::Specification::Consumer:0x007fc0931a5ee0> is not compatible with osx.
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/consumer.rb:38:in `initialize'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification.rb:287:in `new'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification.rb:287:in `consumer'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification.rb:264:in `dependencies'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification.rb:275:in `all_dependencies'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/resolver/lazy_specification.rb:14:in `method_missing'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/resolver.rb:425:in `edge_is_valid_for_target?'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/resolver.rb:412:in `block in valid_dependencies_for_target_from_node'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/resolver.rb:411:in `select'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/resolver.rb:411:in `valid_dependencies_for_target_from_node'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/resolver.rb:72:in `block (2 levels) in specs_by_target'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/resolver.rb:70:in `map'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/resolver.rb:70:in `block in specs_by_target'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/resolver.rb:69:in `each'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/resolver.rb:69:in `specs_by_target'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/resolver.rb:56:in `resolve'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/installer/analyzer.rb:377:in `block in resolve_dependencies'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/installer/analyzer.rb:375:in `resolve_dependencies'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/installer/analyzer.rb:58:in `analyze'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:184:in `analyze'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:106:in `block in resolve_dependencies'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:105:in `resolve_dependencies'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:90:in `install!'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/command/project.rb:101:in `run'
/usr/local/lib/ruby/gems/2.2.0/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
/usr/local/lib/ruby/gems/2.2.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
```

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing github issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=%23%3CPod%3A%3ASpecification%3A%3AConsumer%3A0x007fc0931a5ee0%3E+is+not+compatible+with+osx.&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Solution

  • I think your problem is that you are trying to install an iOS only pod on a Cocoa project (OS X). Your error message reads " is not compatible with OS X". AWS SDKs are not available for OS X (unfortunately), but it is easy to go through the code and remove any iOS specific code and enable OS X compatibility. You can see many comments on this isse here.