Podspec验证但未安装文件

时间:2014-04-19 11:15:30

标签: ios macos cocoapods

我正在编写我的第一个pod规范,虽然我已经设法编写了一个通过验证的规范,pod install似乎安装了pod确定实际的源文件无处可去在我的工作区找到。这是我的podfile:

platform :ios, '7.0'
xcodeproj 'NORLabelNodeiOStest'
pod 'NORLabelNode', :path => '~/Programmering/Development/NORLabelNodePodSpec'
pod 'AFNetworking'

正如您所看到的,NORLabelNode pod是通过本地版本的podspec安装的,如下所示:

Pod::Spec.new do |s|
  s.name             = "NORLabelNode"
  s.version          = "0.9.2"
  s.summary          = "Extension of Apple's SKLabelNode. Allowing multiple lines through the use of \n in the text-string. "
  s.description      = <<-DESC
                       Behaves like an ordinary SKLabelNode with the one difference that adding newline characters to the text- property actually adds line-breaks. This is achieved by creating SKLabelNodes as child-nodes, but keeping these as part of the internal (private) logic.
                       DESC
  s.homepage         = "https://github.com/nickfalk/NORLabelNode.git"
  s.license          = 'MIT'
  s.author           = { "T. Benjamin Larsen" => "benjamin.larsen@noreagle.no" }
  s.source           = { 
        :git => "https://github.com/nickfalk/NORLabelNode.git", 
        :tag => 'v0.9.2' 
    }
  s.social_media_url = 'https://twitter.com/noreagle'

  s.platform     = :ios, '7.0'
  s.ios.deployment_target = '7.0'
  s.osx.deployment_target = '10.9'
  s.requires_arc = true
  s.frameworks = 'SpriteKit'
  s.source_files = 'NORLabelNode.{h,m}'
end

正在运行pod install并未表明出现任何问题:

Analyzing dependencies
Fetching podspec for `NORLabelNode` from `~/Programmering/Development/NORLabelNodePodSpec`
Downloading dependencies
Installing AFNetworking (2.2.3)
Installing NORLabelNode (0.9.2)
Generating Pods project
Integrating client project

[!] From now on use `NORLabelNodeiOStest.xcworkspace`.

AFNetworking pod按预期安装文件,但我自己的NORLabelNode没有。任何人吗?

1 个答案:

答案 0 :(得分:2)

  

正如您所看到的,NORLabelNode pod是通过本地版本的podspec安装的,如下所示

这不是path选项的工作方式。它期望项目本身的路径,而不是规范。

来自docs

  

使用此选项CocoaPods将假定给定的文件夹是Pod的根目录,并将直接从Pods项目中的文件链接。

如果您只想使用规范而不将其添加到主仓库,则可以创建自己的规格仓库(docs)。或者只需将您的规范放在~/.cocoapods/repos/master

中的正确文件夹结构中