Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/113.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Cocoa吊舱:吊舱安装问题_Ios_Iphone_Cocoapods - Fatal编程技术网

Ios Cocoa吊舱:吊舱安装问题

Ios Cocoa吊舱:吊舱安装问题,ios,iphone,cocoapods,Ios,Iphone,Cocoapods,这是我pod文件的内容 platform:ios, '5.0' pod 'AFNetworking', :'~> 1.1.0' 当我尝试$pod安装时。我得到以下错误 [!] Pod::Executable clone "https://github.com/AFNetworking/AFNetworking.git" "/Users/administrator/Library/Caches/CocoaPods/GitHub/a7f129229d47b74a225e1e2ed0bc6

这是我pod文件的内容

platform:ios, '5.0'

pod 'AFNetworking', :'~> 1.1.0'
当我尝试$pod安装时。我得到以下错误

 [!] Pod::Executable clone "https://github.com/AFNetworking/AFNetworking.git" "/Users/administrator/Library/Caches/CocoaPods/GitHub/a7f129229d47b74a225e1e2ed0bc604f35d71ac7" --mirror

Cloning into bare repository '/Users/administrator/Library/Caches/CocoaPods/GitHub/a7f129229d47b74a225e1e2ed0bc604f35d71ac7'...
fatal: unable to access 'https://github.com/AFNetworking/AFNetworking.git/': Failed connect to github.com:443; Operation timed out

这阻碍了我继续前进。问题是什么?

您正在使用旧版本的AFNetworking。因为它的部署目标是5.0。MacOS版本是10.7

规格:

Pod::Spec.new do|s|
s、 名称='AFNetworking'
s、 版本='1.1.0'
s、 许可证='MIT'
s、 summary='一个令人愉快的iOS和OSX网络框架'
s、 主页https://github.com/AFNetworking/AFNetworking'
s、 作者={'Mattt Thompson'=>'m@mattt.me“,”斯科特·雷蒙德“=>”sco@gowalla.com' }
s、 source={:git=>'https://github.com/AFNetworking/AFNetworking.git',:tag=>1.1.0'}
s、 source_文件='AFNetworking'
s、 需要_弧=真
**s、 ios.deployment_target='5.0'**
s、 ios.frameworks='MobileCoreServices','SystemConfiguration'
**s、 osx.deployment_target='10.7'**
s、 osx.frameworks='CoreServices','SystemConfiguration'

s、 prefix_header_contents=我认为pod文件应该是
pod'AFNetworking',“~>1.1.0”
,而不带
。你能试试吗?即使我试过同样的问题也会出现..[!]pod::Executable clone”“/Users/administrator/Library/Caches/cococoapods/GitHub/a7f129229d474a225e1e2ed0bc604f35d71ac7”--镜像克隆到裸存储库“/Users/administrator/Library/Caches/CocoaPods/GitHub/a7f129229d474a225e1e2ed0bc604f35d71ac7”。。。致命:无法访问“”:无法连接到github.com:443;正如我在pod文件中提到的,操作超时。平台:ios,“5.0”。我想从ios5得到它
Pod::Spec.new do |s|
  s.name     = 'AFNetworking'
  s.version  = '1.1.0'
  s.license  = 'MIT'
  s.summary  = 'A delightful iOS and OS X networking framework.'
  s.homepage = 'https://github.com/AFNetworking/AFNetworking'
  s.authors  = { 'Mattt Thompson' => 'm@mattt.me', 'Scott Raymond' => 'sco@gowalla.com' }
  s.source   = { :git => 'https://github.com/AFNetworking/AFNetworking.git', :tag => '1.1.0' }
  s.source_files = 'AFNetworking'
  s.requires_arc = true

  **s.ios.deployment_target = '5.0'**
  s.ios.frameworks = 'MobileCoreServices', 'SystemConfiguration'

  **s.osx.deployment_target = '10.7'**
  s.osx.frameworks = 'CoreServices', 'SystemConfiguration'

  s.prefix_header_contents = <<-EOS
#ifdef __OBJC__
#import <Availability.h>
#if __IPHONE_OS_VERSION_MIN_REQUIRED
  #import <SystemConfiguration/SystemConfiguration.h>
  #import <MobileCoreServices/MobileCoreServices.h>
#else
  #import <SystemConfiguration/SystemConfiguration.h>
  #import <CoreServices/CoreServices.h>
#endif
#endif /* __OBJC__*/
EOS
end