使用pod后没有最新版本

时间:2014-12-26 14:59:57

标签: xcode cocoapods

我正在尝试使用这个项目:

https://github.com/callumboddy/CBZSplashView

这是我的podfile。

target "Name" do

#pod 'CBZSplashView', '> 0.1.1'

end

这就是我所看到的:

Downloading dependencies
Installing CBZSplashView (1.0.0)
Generating Pods project
Integrating client project

但是在Pods文件夹下的文件中,我没有看到最新的代码,虽然它应该带来最新版本(1.0.0)

例如,in Github under classes我看到的代码与xcode中的代码不同。

特别是在xcode中,我没有看到这两个类,它们是在0.1.1

之后添加的
+ (instancetype)splashViewWithIcon:(UIImage *)icon backgroundColor:(UIColor *)backgroundColor
{
  /* This component is useless without an icon */
  NSParameterAssert(icon);

  return [[CBZRasterSplashView alloc] initWithIconImage:icon backgroundColor:backgroundColor];
}

+ (instancetype)splashViewWithBezierPath:(UIBezierPath *)bezier backgroundColor:(UIColor *)backgroundColor
{
  return [[CBZVectorSplashView alloc] initWithBezierPath:bezier backgroundColor:backgroundColor];
}

我做错了或者Github项目有问题吗?

1 个答案:

答案 0 :(得分:1)

这里的问题是作者自发布1.0.0版本以来没有在回购中创建新标记。如果您想使用回购中的最新提交,可以按照here所述指定:head选项。

在您的Podfile中,您将使用:

pod "foo", ":head"

然后当你运行pod install时,将克隆repo,它将使用最新的提交。请注意,这可能很危险,具体取决于作者如何处理master的稳定性。此外,当您运行pod update时,它将自动移动到该点的最新提交,这可能会随时破坏您的项目,因为这不遵循语义版本控制(尽管>也没有)。 / p>

您还可以提交issue,要求图书馆作者添加新标记并推送其新版本的podspec。