CocoaPods Podspec:已声明依赖项,但在构建期间找不到文件

CocoaPods Podspec: Dependency declared, but file not found during build

我正在尝试为 WLXBluetoothDevice 项目制作一个新的 Podspec。我被困在 pod spec lint 上。我已经在 podspec 文件中声明了它的一个依赖项:

s.dependency 'CocoaLumberjack'

(...奇怪的是,如果我在该声明中包含当前版本,lint 很快就会失败,说它无法满足依赖关系。)

当我调用 pod spec lint 时,xcodebuild 被触发,但失败了:

** BUILD FAILED **


The following build commands failed:
    CompileC /var/folders/yz/xbdghvnj1_7fhsrwl5v232b40000gn/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/WLXBluetoothDevice.build/Objects-normal/i386/WLXBluetoothDeviceLogger.o WLXBluetoothDevice/WLXBluetoothDevice/WLXBluetoothDeviceLogger.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
 -> WLXBluetoothDevice (0.6.1)
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
    - NOTE  | xcodebuild:  WLXBluetoothDevice/WLXBluetoothDevice/WLXBluetoothDeviceLogger.h:12:9: fatal error: 'CocoaLumberjack/CocoaLumberjack.h' file not found

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 1 error.

我已经使用 pod 成功安装到另一个项目...所以它似乎只是 lint 构建对此不满意。有什么建议吗?

我使用此答案中描述的格式来解决问题:

代替问题中描述的依赖项,我为依赖项声明了一个子规范,如下所示:

  s.subspec "CocoaLumberjack" do |ss|
      ss.dependency "CocoaLumberjack", "~> 2.2.0"
      ss.xcconfig = { "FRAMEWORK_SEARCH_PATHS" => "$(PODS_ROOT)/CocoaLumberjack"}
  end