前言:今天一时兴起,想接着做之前做的一个Swift的小项目有,打开xcode发现已经是7.0.1的版本号了,集成了iOS9和swift2.0,可想而知,之前基于swift1.2版本的代码又需要修改才能编译通过了哦。
不光是自己写的代码,连引入的第三方库也需要升级,比如网络请求神器Alamofire,在github上搜索Alamofire,看到大神已经更新的版本支持最新的swift和xcode了,果然是大神。按照github文档中的
pod 'Alamofire', '~> 2.0'
加入到Podfile中,执行
pod install --verbose --no-repo-update
果然,报错了,唉。。。程序员就是要和无限的bugs做斗争,起来找原因了。。。
Preparing
Analyzing dependencies
Inspecting targets to integrate
xcrun: error: unable to find utility "xcode-select", not a developer tool or in PATH
Using `ARCHS` setting to build architectures of target `Pods`: (``)
Resolving dependencies of `Podfile`
[!] Unable to satisfy the following requirements:
- `Alamofire (~> 2.0)` required by `Podfile`
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/lib/cocoapods/resolver.rb:411:in `handle_resolver_error'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/lib/cocoapods/resolver.rb:69:in `rescue in resolve'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/lib/cocoapods/resolver.rb:57:in `resolve'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/lib/cocoapods/installer/analyzer.rb:539:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/lib/cocoapods/user_interface.rb:59:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/lib/cocoapods/installer/analyzer.rb:537:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/lib/cocoapods/installer/analyzer.rb:70:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/lib/cocoapods/installer.rb:213:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/lib/cocoapods/installer.rb:136:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/lib/cocoapods/user_interface.rb:59:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/lib/cocoapods/installer.rb:135:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/lib/cocoapods/installer.rb:105:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/lib/cocoapods/command/project.rb:101:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/lib/cocoapods/command.rb:47:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0.beta.5/bin/pod:44:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'