2018年10月18日
1.上傳庫的時候報錯贸呢,第三方庫無法正常下載
解決:本地庫更新 (之后再上傳就正常了)
pod repo update
2018年9月27日
1.已經(jīng)引入頭文件了为牍,還報頭文件錯誤
原因:頭文件引入有先后順序,正確引入即可科乎,建議第三方工具類的放最前面
2018年9月26日
1.編譯通過聋亡,做庫的時候報錯
原因:基本可能是配置文件 問題侧甫,如分層,需要添加依賴
s.source_files = 'HuTrainKit/Classes/*'
s.public_header_files = 'HuTrainKit/Classes/*.h'
s.prefix_header_contents = '#import <HuConfigsKit/HuConfigsHeader.h>','#import <MJExtension/MJExtension.h>','#import <HuCommonUIKit/HuCommonUIHeader.h>','#import <HuUtilsKit/HuUtilsHeader.h>','#import <HuCategoryKit/HuCategoryHead.h>','#import <HuMainProjectCategoryKit/CTMediator+HuMainProjectCategory.h>','#import <MJRefresh/MJRefresh.h>','#import <HuNetKit/HuNetHeader.h>','#import <MJExtension/MJExtension.h>','#import <IQKeyboardManager/IQKeyboardManager.h>','#import <SDWebImage/UIImageView+WebCache.h>','#import <Masonry/Masonry.h>’
s.subspec 'HuTrain' do |ss|
ss.subspec 'Models' do |sss|
sss.source_files = 'HuTrainKit/Classes/HuTrain/Models/*'
end
ss.subspec 'Views' do |sss|
sss.dependency 'HuTrainKit/HuTrain/Models'
sss.source_files = 'HuTrainKit/Classes/HuTrain/Views/*'
end
ss.subspec 'ViewControllers' do |sss|
sss.dependency 'HuTrainKit/HuTrain/Views'
sss.source_files = 'HuTrainKit/Classes/HuTrain/ViewControllers/*'
end
end
對應(yīng)文件夾目錄
注意點:
1.很重要的原因,就是每次做庫驗證的時候堂油,都要升級下tag(刪除tag,在重新添加無效),不然有可能解決了問題,但還是在驗證老的代碼
2.工具類HuTrainUtils 由于依賴 HuScanViewController.h文件 同時又供 TrainTestNeedToKonwViewController.h使用
如果做成一個單獨目錄添加dependency 碧绞,這樣就會導(dǎo)致循環(huán)引用府框,目前放到ViewControllers文件里解決
3.預(yù)加頭文件 最好不要加入本地庫使用的頭文件,可能會有問題讥邻。 s.prefix_header_contents = #import "HuTrainUtils.h"
4.發(fā)現(xiàn)一個詭異的問題迫靖,HuTrainKit 庫用到了HuCategroy 庫里面 一個 containsaString方法 就一直驗證不成功院峡,
解決:先改成左邊系統(tǒng)方法
2018年9月21日
1.驗證包的時候報如下錯誤
- ERROR | [HuUtilsKit/HuUtils] xcodebuild: HuUtilsKit/HuUtilsKit/Classes/HuUtils/HuControllerId.m:88:54: error: too many arguments to function call, expected 0, have 2
已經(jīng)將函數(shù)改成函數(shù)原型,這樣 interface builder -build setting設(shè)置成yes也可以編譯通過系宜,不過還是報錯
參考:https://blog.csdn.net/pinxue/article/details/46468039
最終解決:參考CTMediator的 podspec文件https://github.com/casatwy/CTMediator/blob/master/CTMediator.podspec
添加如下配置后照激,pod install后就可以驗證成功了
s.frameworks = "UIKit"
2.圖片庫報如下錯誤MJPhotoBrowser 報如下錯誤(用了4.多的庫導(dǎo)致)
No visible @interface for 'SDWebImageManager' declares the selector 'downloadImageWithURL:options:progress:completed:'
解決:先加載
s.dependency 'SDWebImage', '~> 3.8.0’
在加載
s.dependency 'MJPhotoBrowser'
參考:https://github.com/openshopio/openshop.io-ios/issues/14
2018年8月27日
1.多級目錄分層模塊
1.1sss.denpendency = 組件面+文件夾名 (不是物理路徑不含Classes)
1.2如果文件夾下面只有子目錄,沒有文件盹牧, 不能設(shè)置ss.source_files = 'HuCommonUIKit/Classes/HuTableViewExtend/*'
#
# Be sure to run `pod lib lint HuCommonUIKit.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'HuCommonUIKit'
s.version = '1.0.11'
s.summary = '1.0.8已經(jīng)成功.現(xiàn)做更深層次分層'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
TODO: Add long description of the pod here.
DESC
s.homepage = 'git@gitlab.317hu.com:HuModularizationLibrary/HuCommonUIKit'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'wangyu204' => 'wangyu@317hu.com' }
s.source = { :git => 'git@gitlab.317hu.com:HuModularizationLibrary/HuCommonUIKit.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.ios.deployment_target = '8.0'
#s.source_files = 'HuCommonUIKit/Classes/**/*'
s.source_files = 'HuCommonUIKit/Classes/*'
s.public_header_files = 'HuCommonUIKit/Classes/HuCommonUIHeader.h'
s.prefix_header_contents = '#import <HuConfigsKit/HuConfigsHeader.h>','#import <HuCategoryKit/HuCategoryHead.h>','#import <HuUtilsKit/HuUtilsHeader.h>'
#-----------------文件分級---------------------#
s.subspec 'Views' do |ss|
ss.source_files = 'HuCommonUIKit/Classes/Views/*'
end
s.subspec 'Utils' do |ss|
ss.dependency 'HuCommonUIKit/Views'
ss.source_files = 'HuCommonUIKit/Classes/Utils/*'
end
s.subspec 'ViewControllers' do |ss|
ss.dependency 'HuCommonUIKit/Views'
ss.source_files = 'HuCommonUIKit/Classes/ViewControllers/*'
end
s.subspec 'HuTableViewExtend' do |ss|
ss.subspec 'DataAdapter' do |sss|
sss.source_files = 'HuCommonUIKit/Classes/HuTableViewExtend/DataAdapter/*'
end
ss.subspec 'VIewBase' do |sss|
sss.dependency 'HuCommonUIKit/Views'
sss.dependency 'HuCommonUIKit/Utils'
sss.dependency 'HuCommonUIKit/HuTableViewExtend/DataAdapter'
sss.source_files = 'HuCommonUIKit/Classes/HuTableViewExtend/VIewBase/*'
end
end
#-----------------文件分級---------------------#
# s.resource_bundles = {
# 'HuCommonUIKit' => ['HuCommonUIKit/Assets/*.png']
# }
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
# s.dependency 'AFNetworking', '~> 2.3'
s.dependency 'HuConfigsKit'
s.dependency 'HuCategoryKit'
s.dependency 'HuUtilsKit'
s.dependency 'MJRefresh', '~> 3.1.15'
end
2018年8月23日
1.本地編譯OK,但是做成庫就報錯
原因:你本地改了第三方HucommonUIKit庫俩垃,本地build ok, 但是驗證庫是在遠端的,你需要把HucommonUIKit庫更改都做成庫才能正常驗證汰寓。
解決:先做修改庫
2018年8月20日
1.做成的庫無法找到頭文件
原因:左邊目錄結(jié)構(gòu)已經(jīng)分組口柳, 右邊配置設(shè)置沒有分組導(dǎo)致
解決:
如果您發(fā)現(xiàn)本文對你有所幫助,如果您認為其他人也可能受益有滑,請把它分享出去跃闹。