美文网首页
CocoaPods私有库.podspec的编写

CocoaPods私有库.podspec的编写

作者: 塞外神龙 | 来源:发表于2018-01-24 12:09 被阅读21次

通过CocoaPods创建开源库、私有库,最关键的是*.podspec的编写。

参考简书上的一位朋友:链接原文地址

关于xib资源使用的问题:


NSBundle *bundle = [NSBundle bundleForClass:[self class]];

                                  NSString *bundleName = bundle.infoDictionary[@"CFBundleName"];

                                  bundleName = [NSString stringWithFormat:@"%@.bundle",bundleName];

                                  NSString *nibName = [NSString stringWithFormat:@"%@/GFBFeedbackViewController",bundleName];

                                  GFBFeedbackViewController *feedbackVc = [[GFBFeedbackViewController alloc]initWithNibName:nibName bundle:bundle];

注意:如果工程中遇到有.a的问题,校验不通过的时候,可以如下:
(XXX : 为代码仓库名,###:索引仓库Git地址,AAA:索引仓库名)
1:本地校验

pod lib lint XXX.podspec --sources=‘https://###.git,https://github.com/CocoaPods/Specs.git' --use-libraries --allow-warnings

2:远程校验

pod spec lint --sources='https://gitee.com/###.git,https://github.com/CocoaPods/Specs.git' --use-libraries --allow-warnings

3:push索引

pod repo push AAA XXX.podspec --sources='https://gitee.com/###.git,https://github.com/CocoaPods/Specs.git' --use-libraries --allow-warnings

mac 下关闭指定端口号

$ lsof -i:8088
$ kill -9 7214

关于引入.a的问题
参考:https://www.jianshu.com/p/a9c6922ad0b4

相关文章

网友评论

      本文标题:CocoaPods私有库.podspec的编写

      本文链接:https://www.haomeiwen.com/subject/xpxuaxtx.html