SXPodCategory 1.0.7

SXPodCategory 1.0.7

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Nov 2020

Maintained by songxing10000, songxing10000c.



  • By
  • dfpo

SXPodCategory

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

SXPodCategory is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "SXPodCategory"

Author

dfpo, [email protected]

License

SXPodCategory is available under the MIT license. See the LICENSE file for more info.

Developer

一、编辑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