一冲秽、創(chuàng)建私有pod倉(cāng)庫(kù)
1.gitlab上創(chuàng)建一個(gè)MySpecs的項(xiàng)目
2.添加你的私有Repo到你的CocoaPods
pod repo add MySpecs <gitlab地址>
二、創(chuàng)建pod項(xiàng)目
以創(chuàng)建TestPods為例:
Pod 相關(guān)
pod install --no-repo-update
pod update --no-repo-update
創(chuàng)建私有pod步驟:
1.pod lib create TestPods
2.a:ObjC b:No c:Specta d:YES e:prefix
3.添加文件盾致,執(zhí)行pod update —no-repo-update劳坑,example中測(cè)試文件
4.提交到git (git pull origin master --allow-unrelated-histories)
git add .
git commit -m”commit”
git remote add origin <gitlab地址>
git push -u origin master
5.編輯podspec文件
6.pod lib lint 檢查錯(cuò)誤及警告并解決直到?jīng)]錯(cuò)誤(如果忽略警告毕谴,添加—allow-warnings)
7.打tag:(確認(rèn)沒(méi)有需要更改的地方之后,打tag)
git tag -m"fisrt release" "0.1.0"
git push —tags
8.pod repo push + 私有pods倉(cāng)庫(kù) + TestPods.podspec (如果忽略警告距芬,添加—allow-warnings)
更新文件之后涝开,執(zhí)行第4步,再執(zhí)行第8步
三框仔、錯(cuò)誤處理
Error :
include of non-modular header inside framework module
1. buldsetting 中設(shè)置 Allow Non-modular Includes In Framework Modules 為 YES
2. 將#import "**.h" 第三方庫(kù)寫(xiě)在 .m文件中舀武,而不是放在.h文件中即可
例如:文件 BaseViewController
將 #import "WSProgressHUD.h" 這行代碼放在 BaseViewController.m文件中
3.pod庫(kù)的頭文件中不能引入依賴(lài)的第三方庫(kù)的頭文件
4.https://blog.csdn.net/andanlan/article/details/50515434