SXPodCategory 1.0.7

SXPodCategory 1.0.7

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最新版本2020年11月

songxing10000songxing10000c 维护。



  • 作者:
  • dfpo

SXPodCategory

CI Status Version License Platform

示例

要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install

需求

安装

SXPodCategory 通过 CocoaPods 提供。要安装它,请简单地在您的 Podfile 中添加以下行:

pod "SXPodCategory"

作者

dfpo, [email protected]

许可证

SXPodCategory遵循MIT许可证。有关更多信息,请参阅LICENSE文件。

开发者

一、编辑podspec文件,同步s.version

 s.version          = '0.0.9'   #pod版本

二、在本地打一个新的tag,可以使用git tag查看本地之前所有的tag

git tag -a 0.0.9 -m "tag release 0.0.9" #打tag

三、将本地打的tag提交到github

git push --tags #提交tag

四、验证podspec文件是否可用。如果有Error和Warning是无法添加到spec repo中的。但是Warning可以存在,可以使用选项--allow-warnings忽略警告。

pod lib lint
pod spec lint --use-libraries --allow-warnings --verbose
pod spec lint ??.podspec --sources='git@????.git,https://github.com/CocoaPods/Specs.git' --allow-warnings

如果lint有问题时,可加入--use-libraries

五、发布到CocoaPods

pod trunk push SXPodCategory.podspec  --allow-warnings
pod repo push 你的私有库名字 SXLoginModule.podspec

最后,更详细的参数请参考

使用Cocoapods制作自己的pod

删除一个版本:

pod trunk delete SXPodCategory 1.0.4

在加载资源文件时:

// xib
NSBundle *bundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[self class]]
                                                 pathForResource:@"SXPodCategory"
                                                 ofType:@"bundle"]];
    self=[[bundle loadNibNamed:@"WJNetWorkFailureView" owner:nil options:nil] lastObject];


// image
NSInteger scale = [UIScreen mainScreen].scale;
    NSString *imageName = [NSString stringWithFormat:@"Payment30@%zdx.png", scale];
    NSBundle *bundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[self class]]
                                                 pathForResource:@"SXPodCategory"
                                                 ofType:@"bundle"]];
    NSString *imagePath = [bundle pathForResource:imageName ofType:nil];
    self.imgV.image = [UIImage imageWithContentsOfFile:imagePath];

子库

s.subspec 'SXSubPod' do |ss|
       ss.source_files = 'SXPodCategory/SXSubPod.{h,m}'
       ss.public_header_files = 'SXPodCategory/SXSubPod/*.h'
end