iOS组件化开发一使用source管理远端库升级(四)

一、克隆远端库代码到本地选择master分支

1、克隆

 

2、代码会显示出你所有版本的tag 

 

二、可以在Example目录下验证代码的正确行;

  cd 到库的文件夹然后

  pod install

  command + r //验证代码是否可用

三、按照正常的添加代码和提交新的代码到master

此处是souretree的简单应用不说明!

四、在最新的节点打tag,记住勾选推送到远程;

 

五、然后终端cd到项目的根目录,执行本地和远端校验!

 

 pod spec lint --private

输出没有报错为正常

 -> MobileKit (0.5.0)
    - WARN  | url: The URL (https://gitee.com/peter_zhang/MobileKit) is not reachable.

Analyzed 1 podspec.

MobileKit.podspec passed validation.

 

如果有下边错误

 -> MobileKit (0.5.0)
    - WARN  | url: The URL (https://gitee.com/peter_zhang/MobileKit) is not reachable.
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - ERROR | xcodebuild:  /Users/zhangpeng/Library/Developer/Xcode/DerivedData/App-gasjivbufxjzbfgftsidmwdvawdj/Build/Products/Release-iphonesimulator/MobileKit/MobileKit.framework/Headers/DESUtils.h:10:9: error: include of non-modular header inside framework module 'MobileKit.DESUtils': '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/CommonCrypto/CommonCrypto.h' [-Werror,-Wnon-modular-include-in-framework-module]
    - ERROR | xcodebuild:  /Users/zhangpeng/Library/Developer/Xcode/DerivedData/App-gasjivbufxjzbfgftsidmwdvawdj/Build/Products/Release-iphonesimulator/MobileKit/MobileKit.framework/Headers/NSData+CommonCrypto.h:41:9: error: include of non-modular header inside framework module 'MobileKit.NSData_CommonCrypto': '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/CommonCrypto/CommonCryptor.h' [-Werror,-Wnon-modular-include-in-framework-module]
    - ERROR | xcodebuild:  /Users/zhangpeng/Library/Developer/Xcode/DerivedData/App-gasjivbufxjzbfgftsidmwdvawdj/Build/Products/Release-iphonesimulator/MobileKit/MobileKit.framework/Headers/NSData+CommonCrypto.h:42:9: error: include of non-modular header inside framework module 'MobileKit.NSData_CommonCrypto': '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/CommonCrypto/CommonHMAC.h' [-Werror,-Wnon-modular-include-in-framework-module]
    - NOTE  | xcodebuild:  /var/folders/tc/wx969bfd5nb7k427j1njlrs00000gn/T/CocoaPods-Lint-20180726-54667-1wjc2um-MobileKit/App/main.m:3:9: fatal error: could not build module 'MobileKit'

请加上--use-libraries:

pod spec lint --private --use-libraries --allow-warnings

 

六、远程索引库更新

 

pod repo push gitee-peter_zhang-mobilekitspec  MobileKit.podspec
//gitee-peter_zhang-mobilekitspec是你本地的索引指向在~/.cocoapods/repos目录下
//MobileKit.podspec项目下文件

 如果提示错误

 pod repo push gitee-peter_zhang-mobilekitspec  MobileKit.podspec --use-libraries --allow-warnings

 

posted @ 2018-07-19 14:45  PeterWolf  阅读(563)  评论(0编辑  收藏  举报