如何为Cocoa应用程序项目设置AWS SDK



我正在尝试为Cocoa应用程序项目设置AWS SDK。

我创建了一个名为Podfile的纯文本文件(没有任何文件扩展名),并添加了以下行:

source 'https://github.com/CocoaPods/Specs.git'
pod "AWSiOSSDKv2"
pod "AWSCognitoSync"

然后运行以下命令:

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!

我认为您的问题是试图在Cocoa项目(OS X)上安装仅限iOS的pod。您的错误消息显示"与OS X不兼容"。AWS SDK不适用于OS X(不幸的是),但很容易浏览代码并删除任何特定于iOS的代码,并启用OS X兼容性。你可以在这里看到很多关于这个isse的评论。

相关内容

  • 没有找到相关文章

最新更新