2014-02-18 444 views
0

這是我的豆莢文件的內容。可可豆莢: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 

這阻礙了我的繼續。什麼是問題?

+0

我覺得podfile應該是'莢 'AFNetworking',「〜> 1.1.0''沒有':'。可你試試嗎? – Divya

+0

即使我嘗試了以下相同的問題。[!] Pod :: Executable克隆「https://github.com/AFNetworking/AFNetworking.git」「/ Users/administrator/Library/Caches/CocoaPods/GitHub/a7f129229d47b74a225e1e2ed0bc604f35d71ac7」 - 鏡像 克隆到裸存儲庫'/ Users/administrator/Library/Caches/CocoaPods/GitHub/a7f129229d47b74a225e1e2ed0bc604f35d71ac7'... 致命:無法訪問'https://github.com/AFNetworking/AFNetworking.git/' :無法連接到github.com:443;操作超時 – Rajesh

回答

0

您正在使用舊版AFNetworking。因爲它的部署目標是5.0。 Mac OS版本是10.7。

規格:

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' => '[email protected]', 'Scott Raymond' => '[email protected]' } 
    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 

所以應該使用更新版本https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking

+0

正如我在pod文件中提到的。 平臺:ios,'5.0'。我想從ios5中獲得 – Rajesh