SXPodCategory 1.0.1

SXPodCategory 1.0.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Mar 2018

Maintained by songxing10000.


Downloads

Total339
Week0
Month6

Installs

Apps7
powered by Segment

GitHub

Stars1
Watchers1
Forks0
Issues0
Contributors1
Pull Requests0

Code

Files60
LOCLines of Code 2,178


  • 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='[email protected]????.git,https://github.com/CocoaPods/Specs.git' --allow-warnings

五、发布到CocoaPods

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

最后,更详细请参数

使用Cocoapods制作自己的pod

在加载资源文件时:

// 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:@"[email protected]%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