gpt4 book ai didi

cocoa - 如何设置AWS SDK for Cocoa应用程序项目?

转载 作者:行者123 更新时间:2023-12-03 17:50:39 27 4
gpt4 key购买 nike

我正在尝试设置适用于 Cocoa 应用程序项目的 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!

最佳答案

我认为你的问题是你正在尝试在 Cocoa 项目 (OS X) 上安装仅 iOS 的 pod。您的错误消息显示“与 OS X 不兼容”。 AWS 开发工具包不适用于 OS X(不幸的是),但可以轻松浏览代码并删除任何 iOS 特定代码并启用 OS X 兼容性。你可以看到很多关于这个问题的评论here

关于cocoa - 如何设置AWS SDK for Cocoa应用程序项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28408184/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com