gpt4 book ai didi

ios - Podspec 验证但未安装文件

转载 作者:行者123 更新时间:2023-11-28 22:09:55 25 4
gpt4 key购买 nike

我正在编写我的第一个 pod 规范,虽然我已经设法编写了一个通过验证的规范并且 pod install 似乎安装了 pod 好的实际源文件在我的工作区中无处可寻。这是我的播客文件:

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 没有。有人吗?

最佳答案

As you can see the NORLabelNode pod is installed through a local version of the podspec which looks like this

这不是 path 选项的工作方式。它需要通往项目本身的路径,而不是规范。

来自docs :

Using this option CocoaPods will assume the given folder to be the root of the Pod and will link the files directly from there in the Pods project.

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

中正确的文件夹结构中

关于ios - Podspec 验证但未安装文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23169311/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com