4

更新

我刚刚将 repo 克隆到我安装了 CocoaPods 0.14.0.rc2 的主机上,并且一切都安装得很顺利。

我会在以后添加更多依赖项时观察它是如何工作的,但现在看来,新版本的 CocoaPods 成功了……它仍然让我有点不安,不知道我可以依赖多少工具。


我开始研究 CocoaPods 来管理项目的依赖关系。

最初的开始很顺利——我正在评估它的项目是一个 iOS 静态库,它从一开始就使用 LibComponentLogging:

创建指定 LibComponentLogging-NSLog 的 Podfile 和 LibComponentLogging-pods(这还没有在 common specs 存储库中,但可以并且已经包含在本地)作为依赖项后,最初pod install的解决和安装依赖项并创建了工作区.

一切都很好,花花公子。

在对项目进行了一些修改之后,我在 Podfile 中添加了另外两个 pod(FMDB 和 sqlcipher——我必须为此创建一个 podspec)。

再次运行pod install,将指定的存储库获取到缓存中,然后离开并为 Pod 创建子目录,并且……从来没有用任何东西填充它们——没有发出错误。

为了排除故障,我从 Podfile 中删除了我的自定义 podspec 的 pod,然后pod install再次运行——结果相同。

在再次运行之前,我删除了空的Pods/FMDB- 和 -Pods/sqlcipher目录以及失败内容的所有其他残余pod install --verbose- 结果相同,也许这是第一次报告失败。

我在所有可能的组合中都这样做了——从字面上看……</p>

这时,我有点生气了。
我删除Podfile.lock了在某个时间点弹出的内容、工作区、Pods 目录批发、~/Library/Caches/CocoaPods~/.cocoapods,以及我能想到的所有其他内容,然后重新开始。

我跑了pod setup,又加LibComponentLogging-pods回来了,(当然是在我的项目目录中)我又重新跑pod install --verbose了。

现在的结果不同了,即使是那些在最初尝试中完美运行的 pod 也失败了……</p>

任何对这里发生的事情的见解将不胜感激......</p>


为了更好地衡量,这是我的 Podfile、自定义规范以及最近一次“Tabula Rasa”尝试让这些东西再次工作的输出:

播客文件:

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$ 
4

0 回答 0