1.如果組件化工程里依賴的framework,里面有了.a文件,pod install會(huì)報(bào)錯(cuò)
target has transitive dependencies that include static binaries: 報(bào)這個(gè)錯(cuò)誤
解決辦法是 在pod podfile文件里加上下面一行代碼
# 依賴三方靜態(tài)庫(kù)需添加
pre_install do |installer|?
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
然后pod install 通過(guò)
然后驗(yàn)證的時(shí)候 pod lib lint--allow-warnings --use-libraries?
2 如果集成組件報(bào)錯(cuò)處理 --include of non-modular header inside XXXX
解決方法:把target下?Build Settings中?Allow Non-modular includes in Framework Modules選項(xiàng)卡設(shè)為yes。
(這不是最好的解決方法,好的是讓做這個(gè)組件的人在podspec文件里設(shè)置)
s.user_target_xcconfig = { 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES'? ?}
3.如果pod search xxx 自己的組件,搜索不到
解決方法:rm ~/Library/Caches/CocoaPods/search_index.json
4.如果工程集成自己制作的組件,報(bào)搜索不到,或者驗(yàn)證的時(shí)候報(bào)找不到這個(gè)組件
在 podfile? 加上gitsource 和自己的私有庫(kù)source?
source 'https://github.com/CocoaPods/Specs.git'
source 'http://bj.gitlab.xxxxcom/ios-team/xxxxRepos.git'
驗(yàn)證的時(shí)候后面也要加上這個(gè)
5.如果 pod lib lint 或者 pod spec lint 報(bào)錯(cuò)
ERROR | [iOS] unknown: Encountered an unknown error (Could not find a `ios` simulator (valid values: com.apple.coresimulator.simruntime.ios-12-2, com.apple.coresimulator.simruntime.tvos-12-2, com.apple.coresimulator.simruntime.watchos-5-2). Ensure that Xcode -> Window -> Devices has at least one `ios` simulator listed or otherwise add one.) during validation.
解決方法 升級(jí)cocoaPods
sudo gem install cocoapods
然后再次驗(yàn)證
6.如果在組件里用到PLShortVideoKit ,需要在podspec文件里 添加?s.pod_target_xcconfig = { 'VALID_ARCHS[sdk=iphonesimulator*]' => 'PLShortVideoKit' }
或者在驗(yàn)證后面加上--skip-import-validation 但是這個(gè)方法不好,如果其他依賴你做的組件,都需要加這個(gè)了,所以最好在podspec文件里配置
7?pod lib lint 報(bào)錯(cuò)?

8.往github上推庫(kù)如果報(bào)443錯(cuò)誤

可以更改hosts,前往/private/etc這個(gè)文件夾下,找到hosts,在最下面加上199.232.28.133 raw.githubusercontent.com?
9.如果pod trunk push 報(bào)

執(zhí)行?1. 執(zhí)行命令:pod trunk register '12345678@qq.com' 'hhhh' --description='mac pro'
然后去郵箱里認(rèn)證,然后在推就可以了
2. 在自己郵箱里面去點(diǎn)擊,那個(gè)郵件里面的連接,就可以了(如果找不到那個(gè)郵件,多等個(gè)幾分鐘的?;蛑ダ渲姓艺?,有可能是騰訊把他等垃圾郵件了)
3. 返回終端里面繼續(xù)執(zhí)行命令:pod trunk push YQJLive.podspec --allow-warnings