我刚刚将repo克隆到我安装了CocoaPods 0.14.0.rc2的主机上,所有内容都安装顺利。
我会看到这是如何工作的,而我在后面添加了更多的依赖项,但是现在似乎新版本的CocoaPods做了这个伎俩...它仍然让我有点不安,不知道我能用多少钱依靠这个工具。
我开始研究CocoaPods来管理项目的依赖关系。
初始启动顺利进行 - 我正在评估它的项目是一个从一开始就使用LibComponentLogging的iOS静态库:
创建指定LibComponentLogging-NSLog和LibComponentLogging-pods的Podfile(这不在公共规范存储库中,但可以并且本地包含在内)作为依赖项,初始pod install
消失后解决并安装依赖项并创建工作区。
一切都很好,花花公子。
在对项目进行了一些黑客攻击之后,我又向Podfile添加了两个pod(FMDB和sqlcipher - 我必须为其创建podspec)。
再次运行pod install
,将指定的存储库提取到缓存中,离开并创建Pod的子目录,并且...... 从不用任何东西填充它们 - 没有发出错误。
要进行问题排查,我从Podfile中删除了自定义podspec的pod,然后再次运行pod install
- 结果相同。
我删除了空的Pods/FMDB
- 和Pods/sqlcipher
- 目录,以及失败的其他所有残余内容,然后再次运行pod install --verbose
- 相同的结果,也许这里是报告失败这是第一次。
我在所有可能的组合中做到了 - 非常字面意思......
此时,我有点恼火
我删除了某个时间点弹出的Podfile.lock
,工作区,Pods目录批发,~/Library/Caches/CocoaPods
,~/.cocoapods
,我能想到的所有其他事情,并开始新的
我跑了pod setup
,又添加了LibComponentLogging-pods
,然后(当然是在我项目的目录中)我再次重新pod install --verbose
。
结果现在不同了,因为即使那些豆荚在初始尝试中完美无缺地失败了......
非常感谢任何有关这里发生的事情的见解......
为了更好的衡量,这里是我的Podfile,自定义规范,以及最新的“Tabula Rasa”试图让这些东西再次运行的输出:
Podfile:
platform :ios, '5.1'
xcodeproj 'TestLibrary.xcodeproj'
pod 'sqlcipher', :podspec => 'sqlcipher.podspec'
pod 'FMDB', '1.5.1'
pod 'LibComponentLogging-pods'
pod 'LibComponentLogging-NSLog'
set_arc_compatibility_flag!
我的自定义sqlcipher.podspec:
Pod::Spec.new do |s|
s.name = "sqlcipher"
s.version = "2.0.6"
s.summary = "SQLCipher is an SQLite extension that provides 256 bit AES encryption of database files."
s.description = <<-DESC
Pages are encrypted before being written to disk and are decrypted when read back.
Due to the small footprint and great performance it’s ideal for protecting embedded application databases and is well suited for mobile development.
DESC
s.homepage = "http://sqlcipher.net"
s.license = { :type => 'MIT Style', :file => 'LICENSE' }
s.author = { "Steven Lombardo" => "sjlombardo@zetetic.net" }
s.source = { :git => "https://github.com/sqlcipher/sqlcipher.git", :tag => "v2.0.6" }
s.ios.deployment_target = '5.0'
s.osx.deployment_target = '10.7'
s.source_files = 'src/**/*.{h,m}', 'ext/**/*.{h,m}'
s.public_header_files = 'src/**/*.h'
s.libraries = 'openssl', 'crypto'
s.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/openssl', 'OTHER_CFLAGS' => '-DSQLITE_HAS_CODEC' }
end
输出:
quicksilver:TestLibrary me$ pod install --verbose
Updating Spec Repositories
Updating spec repo `lcl'
$ /usr/bin/git pull
Already up-to-date.
Updating spec repo `master'
$ /usr/bin/git pull
Already up-to-date.
Cocoapods 0.14.0.rc2 is available.
Resolving dependencies of: /Users/me/Documents/progging/TestLibrary/Podfile
Resolving dependencies for target `default' (iOS 5.1)
- sqlcipher (from `sqlcipher.podspec')
* Fetching podspec for `sqlcipher' from: sqlcipher.podspec
- FMDB (= 1.5.1)
- LibComponentLogging-pods
- LibComponentLogging-NSLog
- LibComponentLogging-Core (>= 1.1.6)
Installing dependencies
-> Installing FMDB (1.5.1)
-> Creating cache git repo (/Users/me/Library/Caches/CocoaPods/Git/d92b1cbf09a2c9dfcf7b19167b8f9c87d5e7b65f)
$ /usr/bin/git clone "https://github.com/ccgus/fmdb.git" "/Users/me/Library/Caches/CocoaPods/Git/d92b1cbf09a2c9dfcf7b19167b8f9c87d5e7b65f"
Cloning into '/Users/me/Library/Caches/CocoaPods/Git/d92b1cbf09a2c9dfcf7b19167b8f9c87d5e7b65f'...
-> Cloning git repo
$ /usr/bin/git rev-list --max-count=1 v1.5.1
be9cbd1bfa3bd16914cfef75cb05053b80f41b24
$ /usr/bin/git init
Initialized empty Git repository in /Users/me/Documents/progging/TestLibrary/Pods/FMDB/.git/
$ /usr/bin/git remote add origin '/Users/me/Library/Caches/CocoaPods/Git/d92b1cbf09a2c9dfcf7b19167b8f9c87d5e7b65f'
$ /usr/bin/git fetch origin tags/v1.5.1
From /Users/me/Library/Caches/CocoaPods/Git/d92b1cbf09a2c9dfcf7b19167b8f9c87d5e7b65f
* tag v1.5.1 -> FETCH_HEAD
$ /usr/bin/git reset --hard FETCH_HEAD
HEAD is now at be9cbd1 Merge pull request #37 from ivira/master
$ /usr/bin/git checkout -b activated-pod-commit
Switched to a new branch 'activated-pod-commit'
-> Installing documentation
[!] Skipping documentation generation because appledoc can't be found.
-> Installing LibComponentLogging-Core (1.3.1)
-> Creating cache git repo (/Users/me/Library/Caches/CocoaPods/Git/a97552cd1e0755d054148dacafea69df60161862)
$ /usr/bin/git clone "https://github.com/aharren/LibComponentLogging-Core.git" "/Users/me/Library/Caches/CocoaPods/Git/a97552cd1e0755d054148dacafea69df60161862"
Cloning into '/Users/me/Library/Caches/CocoaPods/Git/a97552cd1e0755d054148dacafea69df60161862'...
-> Cloning git repo
$ /usr/bin/git rev-list --max-count=1 1.3.1
17e294028794f7e30a3857934c8534454427bdcd
$ /usr/bin/git init
Initialized empty Git repository in /Users/me/Documents/progging/TestLibrary/Pods/LibComponentLogging-Core/.git/
$ /usr/bin/git remote add origin '/Users/me/Library/Caches/CocoaPods/Git/a97552cd1e0755d054148dacafea69df60161862'
$ /usr/bin/git fetch origin tags/1.3.1
From /Users/me/Library/Caches/CocoaPods/Git/a97552cd1e0755d054148dacafea69df60161862
* tag 1.3.1 -> FETCH_HEAD
$ /usr/bin/git reset --hard FETCH_HEAD
HEAD is now at 17e2940 LibComponentLogging-Core-1.3.1
$ /usr/bin/git checkout -b activated-pod-commit
Switched to a new branch 'activated-pod-commit'
-> Installing documentation
[!] Skipping documentation generation because appledoc can't be found.
-> Installing LibComponentLogging-NSLog (1.0.4)
-> Creating cache git repo (/Users/me/Library/Caches/CocoaPods/Git/648148f5d0724fa902677dba515ff302e017f305)
$ /usr/bin/git clone "https://github.com/aharren/LibComponentLogging-NSLog.git" "/Users/me/Library/Caches/CocoaPods/Git/648148f5d0724fa902677dba515ff302e017f305"
Cloning into '/Users/me/Library/Caches/CocoaPods/Git/648148f5d0724fa902677dba515ff302e017f305'...
-> Cloning git repo
$ /usr/bin/git rev-list --max-count=1 1.0.4
9ea9494870c178972e4af27471a10337d176dd77
$ /usr/bin/git init
Initialized empty Git repository in /Users/me/Documents/progging/TestLibrary/Pods/LibComponentLogging-NSLog/.git/
$ /usr/bin/git remote add origin '/Users/me/Library/Caches/CocoaPods/Git/648148f5d0724fa902677dba515ff302e017f305'
$ /usr/bin/git fetch origin tags/1.0.4
From /Users/me/Library/Caches/CocoaPods/Git/648148f5d0724fa902677dba515ff302e017f305
* tag 1.0.4 -> FETCH_HEAD
$ /usr/bin/git reset --hard FETCH_HEAD
HEAD is now at 9ea9494 add support for non-clang compilers
$ /usr/bin/git checkout -b activated-pod-commit
Switched to a new branch 'activated-pod-commit'
-> Installing documentation
[!] Skipping documentation generation because appledoc can't be found.
-> Installing LibComponentLogging-pods (0.0.1)
-> Creating cache git repo (/Users/me/Library/Caches/CocoaPods/Git/5798a4173d672827fae705b4902b4c1fa2b4439b)
$ /usr/bin/git clone "https://github.com/aharren/LibComponentLogging-pods.git" "/Users/me/Library/Caches/CocoaPods/Git/5798a4173d672827fae705b4902b4c1fa2b4439b"
Cloning into '/Users/me/Library/Caches/CocoaPods/Git/5798a4173d672827fae705b4902b4c1fa2b4439b'...
-> Cloning git repo
$ /usr/bin/git rev-list --max-count=1 0.0.1
440e1f3df8e06b6197846f4825bd720539653541
$ /usr/bin/git init
Initialized empty Git repository in /Users/me/Documents/progging/TestLibrary/Pods/LibComponentLogging-pods/.git/
$ /usr/bin/git remote add origin '/Users/me/Library/Caches/CocoaPods/Git/5798a4173d672827fae705b4902b4c1fa2b4439b'
$ /usr/bin/git fetch origin tags/0.0.1
From /Users/me/Library/Caches/CocoaPods/Git/5798a4173d672827fae705b4902b4c1fa2b4439b
* tag 0.0.1 -> FETCH_HEAD
$ /usr/bin/git reset --hard FETCH_HEAD
HEAD is now at 440e1f3 add lcl_pods.h
$ /usr/bin/git checkout -b activated-pod-commit
Switched to a new branch 'activated-pod-commit'
-> Installing documentation
[!] Skipping documentation generation because appledoc can't be found.
-> Installing sqlcipher (2.0.6)
-> Creating cache git repo (/Users/me/Library/Caches/CocoaPods/Git/98d25df407a9bd30ae63045cf62ee311541f4fb0)
$ /usr/bin/git clone "https://github.com/sqlcipher/sqlcipher.git" "/Users/me/Library/Caches/CocoaPods/Git/98d25df407a9bd30ae63045cf62ee311541f4fb0"
Cloning into '/Users/me/Library/Caches/CocoaPods/Git/98d25df407a9bd30ae63045cf62ee311541f4fb0'...
-> Cloning git repo
$ /usr/bin/git rev-list --max-count=1 v2.0.6
6dbdd4663cfed9d54803d22b1bdce8b9884e1f6b
$ /usr/bin/git init
Initialized empty Git repository in /Users/me/Documents/progging/TestLibrary/Pods/sqlcipher/.git/
$ /usr/bin/git remote add origin '/Users/me/Library/Caches/CocoaPods/Git/98d25df407a9bd30ae63045cf62ee311541f4fb0'
$ /usr/bin/git fetch origin tags/v2.0.6
From /Users/me/Library/Caches/CocoaPods/Git/98d25df407a9bd30ae63045cf62ee311541f4fb0
* tag v2.0.6 -> FETCH_HEAD
$ /usr/bin/git reset --hard FETCH_HEAD
HEAD is now at 6dbdd46 bump to 2.0.6
$ /usr/bin/git checkout -b activated-pod-commit
Switched to a new branch 'activated-pod-commit'
-> Installing documentation
[!] Skipping documentation generation because appledoc can't be found.
Generating support files
- Generating xcconfig file at `/Users/me/Documents/progging/TestLibrary/Pods/Pods.xcconfig'
- Generating prefix header at `/Users/me/Documents/progging/TestLibrary/Pods/Pods-prefix.pch'
- Generating copy resources script at `/Users/me/Documents/progging/TestLibrary/Pods/Pods-resources.sh'
- Running post install hooks
-> Creating LibComponentLogging configuration
Creating folder '/Users/me/Documents/progging/TestLibrary/Pods/LibComponentLogging-pods'
Creating folder '/Users/me/Documents/progging/TestLibrary/Pods/Headers/LibComponentLogging-pods'
Creating folder '/Users/me/Documents/progging/TestLibrary/Pods/BuildHeaders/LibComponentLogging-pods'
Adding suffix '.pods.main' to includes in file '/Users/me/Documents/progging/TestLibrary/Pods/LibComponentLogging-Core/lcl.h'
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Report
* What did you do?
* What did you expect to happen?
* What happened instead?
### Stack
```
CocoaPods : 0.13.0
Ruby : ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0]
RubyGems : 1.8.24
Host : Mac OS X 10.7.4 (11E53)
Xcode : 4.4.1 (4F1003)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib
Repositories : lcl - git://github.com/aharren/LibComponentLogging-CocoaPods-Specs.git @ d18c0de80368283253d5cf3b6faca73eadf4e58f
master - https://github.com/CocoaPods/Specs.git @ 067e6c0ca9da516ef8807b363643150dc0124c16
```
### Podfile
```ruby
platform :ios, '5.1'
xcodeproj 'TestLibrary.xcodeproj'
pod 'sqlcipher', :podspec => 'sqlcipher.podspec'
pod 'FMDB', '1.5.1'
pod 'LibComponentLogging-pods'
pod 'LibComponentLogging-NSLog'
set_arc_compatibility_flag!
```
### Error
```
No such file or directory - /Users/me/Documents/progging/TestLibrary/Pods/LibComponentLogging-Core/lcl.h
/Users/me/.cocoapods/lcl/LibComponentLogging-pods/0.0.1/LibComponentLogging-pods.podspec:195:in `read'
/Users/me/.cocoapods/lcl/LibComponentLogging-pods/0.0.1/LibComponentLogging-pods.podspec:195:in `add_suffix_to_includes'
/Users/me/.cocoapods/lcl/LibComponentLogging-pods/0.0.1/LibComponentLogging-pods.podspec:126:in `prepare_configure'
/Users/me/.cocoapods/lcl/LibComponentLogging-pods/0.0.1/LibComponentLogging-pods.podspec:62:in `configure_logger'
/Users/me/.cocoapods/lcl/LibComponentLogging-NSLog/1.0.4/LibComponentLogging-NSLog.podspec:30:in `post_install'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.13.0/lib/cocoapods/installer.rb:139:in `run_post_install_hooks'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.13.0/lib/cocoapods/installer.rb:138:in `each'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.13.0/lib/cocoapods/installer.rb:138:in `run_post_install_hooks'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.13.0/lib/cocoapods/installer.rb:137:in `each'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.13.0/lib/cocoapods/installer.rb:137:in `run_post_install_hooks'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.13.0/lib/cocoapods/installer.rb:126:in `install!'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.13.0/lib/cocoapods/command/install.rb:53:in `run'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.13.0/lib/cocoapods/command.rb:72:in `run'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.13.0/bin/pod:12
/usr/bin/pod:23:in `load'
/usr/bin/pod:23
```
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing github issues similar to yours:
https://github.com/CocoaPods/CocoaPods/issues/search?q=No+such+file+or+directory+-+%2FUsers%2Fme%2FDocuments%2Fprogging%2FTestLibrary%2FPods%2FLibComponentLogging-Core%2Flcl.h
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Don't forget to anonymize any private data!
quicksilver:TestLibrary me$