質問

I’ve been trying to AFNetworking-RACExtensions by using CocoaPods, but it always shows this error:

[!] Unable to satisfy the following requirements:
- `ReactiveCocoa (= 2.1.8)` required by `Podfile`
- `ReactiveCocoa/no-arc` required by `ReactiveCocoa (2.1.8)`
- `ReactiveCocoa/Core` required by `ReactiveCocoa (2.1.8)`
- `ReactiveCocoa/no-arc` required by `ReactiveCocoa/Core (2.1.8)`
- `ReactiveCocoa (~> 2.1)` required by `ReactiveViewModel (0.1.1)`
- `ReactiveCocoa (~> 1.5.0)` required by `AFNetworking-RACExtensions (0.0.1)`

What can possible the the cause? Is it because AFNetworking-RACExtensions need AFNetworking 1.5 to work?

役に立ちましたか?

解決

The issue here is that you need a version of ReativeCocoa that matches the semantic versioning required by ~> 1.5.0. So I believe that would include the highest version matching 1.5.x but not 1.6*. Regardless 2.* definitely isn't compatible with that. Since you're requiring 2.x other places you can not have both of these versions at once. This is something CocoaPods can't handle because of the nature of duplicate symbols in Objective-C. The only way to fix this would be to downgrade your 2.x version, although I assuming going down to before 2.0 would be difficult. Or the AFNetworking-RACExtensions upgrading to support ReactiveCocoa 2.x.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top