我正在尝试通过cocoapod将AFNetworking SDK安装到我的TVOS项目中。我经常遇到这个错误。
Updating local specs repositories
Analyzing dependencies
[!] Unable to satisfy the following requirements:
- `AFNetworking (= 3.0)` required by `Podfile`
我的cocoapod版本是cocoapods-0.39.0
,这里是Podfile
# Uncomment this line to define a global platform for your project
platform :tvos, '9.0'
source 'https://github.com/CocoaPods/Specs.git'
target 'testing' do
pod 'AFNetworking' , '3.0'
end
target 'testingTests' do
end
target 'testingUITests' do
end
某些机构可以指导我如何使其正常工作,或者目前根据此链接不支持https://github.com/AFNetworking/AFNetworking/issues/2998
答案 0 :(得分:3)
这显示了一个多平台Podfile,可以解决您的AFNetworking问题。最后,您必须指定不同的版本:
source 'https://github.com/CocoaPods/Specs.git'
inhibit_all_warnings!
xcodeproj 'MyAppSuite'
def common_pods
pod 'AFNetworking', '3.0.0-beta.2'
pod 'CocoaHTTPServer', :git => 'https://github.com/fkuehne/CocoaHTTPServer.git'
end
target :phoneApp do
link_with 'YourIOSTargetNameHere'
use_frameworks!
platform :ios, '8.1'
common_pods
end
target :tvApp do
link_with 'YourTVOSTargetNameHere'
use_frameworks!
platform :tvos, '9.0'
common_pods
end