2015-02-09 54 views
0

我正在嘗試設置適用於Cocoa Application項目的AWS開發工具包。如何爲Cocoa Application項目設置AWS開發工具包?

我創建了一個名爲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! 

回答

1

我覺得你的問題是,您正在嘗試在Cocoa項目(OS X)上安裝僅iOS的Pod。您的錯誤消息顯示「與OS X不兼容」。 AWS SDK不適用於OS X(不幸的是),但很容易通過代碼並移除任何iOS特定代碼並啓用OS X兼容性。你可以在這裏看到很多評論here

相關問題