我正在编写我的第一个pod规范,虽然我已经成功地编写了一个通过验证的规范,而且pod install似乎安装了pod OK,但在我的工作区中却找不到实际的源文件。这是我的文件:
platform :ios, '7.0'
xcodeproj 'NORLabelNodeiOStest'
pod 'NORLabelNode', :path => '~/Programmering/Development/NORLabelNodePodSpec'
pod 'AFNetworking'如您所见,NORLabelNode荚是通过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吊舱按预期安装文件,但我自己的NORLabelNode不安装。有没有人?
发布于 2014-04-19 15:21:10
如您所见,NORLabelNode吊舱是通过podspec的本地版本安装的,如下所示
这不是path选项的工作方式。它期望找到项目本身的路径,而不是规范。
来自文档
使用此选项,CocoaPods将假定给定的文件夹是Pod的根,并将直接链接Pods项目中的文件。
如果您只想使用您的规范而不添加到主回购,您可以创建您自己的回购规格(文档)。或者将您的规范放在~/.cocoapods/repos/master中正确的文件夹结构中。
https://stackoverflow.com/questions/23169311
复制相似问题