zoukankan      html  css  js  c++  java
  • 构建私有库(开源库)

    1: 将本地代码与git建立连接后。

    2: pod spec creat xxx.podspec(里面是一些配置信息)

    3: vi xxx.podspec 填写需要的信息

    Pod::Spec.new do |s|
      s.name             = "FFHorizontalScrollView"
      s.version          = "0.1.6"
      s.summary          = "广告消息水平滚动"
      s.description      = <<-DESC
                           这是一个水平滚动的告知信息view,可以自定义文字的大小颜色,暂不支持点击事件。使用Static Library生成。
                           DESC
      s.homepage         = "https://github.com/jifeif/FFHorizontalScroll"
      s.license          = 'MIT'
      s.author           = { "XXX" => "XXX@gmail.com" }
      s.source           = { :git => "https://github.com/jifeif/FFHorizontalScroll.git", :tag => s.version.to_s }
      # s.social_media_url = 'https://twitter.com/NAME'
    
      s.platform     = :ios, '9.0'
      s.requires_arc = true
    
      s.source_files = "FFHorizontalScroll/need/Static/*.h"
      s.vendored_libraries = "FFHorizontalScroll/need/Static/*.a" 
      s.resources = "FFHorizontalScroll/need/FFHorizontalScroll.bundle"
      s.frameworks = 'UIKit'
    
    end
    
    /*
    如果已经打包成了静态库:
    spec.vendored_libraries = 'xxx/xxx/xxx.a'
    如果已经打包成了动态库:
    spec.vendored_frameworks = 'xxx/xxx/xxx.framework'
    如果已经在静态库或者生成的动态里生成了bundle
    spec.resources = 'xxx/xxx/xxx.bundle'
    在framework的.h文件中,导入头文件要使用"",而不是<>
    */
    https://blog.csdn.net/zramals/article/details/81388703

    4: pod spec lint --allow-warnings xxxx.podspec //校验本地和远程是否通过。

        pod lib lint --allow-warnings xxx.podspec // 校验本地是否通过。

        --allow-warnings //忽略警告。 --verbose // 显示详细信息

    5:如果验证通过。

      git tag xxx

        git push origin --tags

        打tag。要保证和xxx.podspec中的版本号一直,否则 trunk push会出错

         pod trunk me //检测是否注册了trunk账号。 如果没有注册

         pod trunk register '邮箱' '名字' --description 'Mac pro(电脑信息)'

         pod trunk push --allow-warnings xxx.podspec 发布。

    6:pod setup //初始化

         pod repo update //更新pod库

         pod search xxx //搜索发布的版本。

         /*

        如果trunk push成功 搜索不到结果

        删除 ~/Library/Caches/CocoaPods/search_index.json

        pod search XXX 会出现结果           

      */

      

  • 相关阅读:
    解释器模式
    享元模式
    中介者模式
    职责链模式
    命令模式
    桥接模式
    Java迭代器Iterator
    [Swift]LeetCode1247. 交换字符使得字符串相同 | Minimum Swaps to Make Strings Equal
    [Swift]LeetCode1248. 统计「优美子数组」| Count Number of Nice Subarrays
    [Swift]LeetCode1239. 串联字符串的最大长度 | Maximum Length of a Concatenated String with Unique Characters
  • 原文地址:https://www.cnblogs.com/jisa/p/9963329.html
Copyright © 2011-2022 走看看