美文网首页
iOS组件化实践过程

iOS组件化实践过程

作者: 经天纬地 | 来源:发表于2021-08-17 16:56 被阅读0次
  1. 创建私有库的索引文件repoA:
    pod repo add repoA repoA_url
  2. 创建私有库podA:
    pod lib create podA
  3. 编辑podA代码
  4. 远程仓库新建项目podA,注意不要勾选创建.md文件那些选项
  5. 打开podA.podspec文件,编辑好信息(可参考最后的example)
  6. podA推送到远程:
    git remote add origin https://github.com/JW-chenjingwei/podA.git
    git branch -M main
    git push -u origin main
  7. 打上tag:
    git tag 0.1.0
    git push —tag
  8. 检查podA是否通过:
    pod repo lint podA
  9. 把podA和私有库索引repo关联起来
    pod repo push repoA podA.podspec
  10. 检查是否成功:
    pod search podA

Example:podA.podspec信息



Pod::Spec.new do |s|
  s.name             = 'PersonalEnglishLib'
  s.version          = '0.1.0'
  s.summary          = '这是一个说英语很牛逼的框架,逼很牛,你忍一下'

# 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         = 'https://github.com'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { ‘XX’ }
  s.source           = { :git => 'https://github.com/JW-chenjingwei/PersonalEnglishLib.git', :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

  s.ios.deployment_target = '13.0'
  s.swift_version = '5.0'
  s.source_files = 'PersonalEnglishLib/Classes/**/*'
  
  # s.resource_bundles = {
  #   'PersonalEnglishLib' => ['PersonalEnglishLib/Assets/*.png']
  # }

  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'
end
12. 可能会出现的错误提示,要求输入github账号密码时提示需要使用access tokens,解决方法就是在github的devlep settiing里创建access tokens,在电脑里的钥匙串中搜索github,删除之前保存的github账号密码,下次要求输入密码的时候输入access tokens即可

相关文章

  • iOS组件化实践(基于CocoaPods)

    iOS组件化实践(基于CocoaPods) iOS组件化实践(基于CocoaPods)

  • 蜂鸟商家版 iOS 组件化 / 模块化实践总结

    蜂鸟商家版 iOS 组件化 / 模块化实践总结 蜂鸟商家版 iOS 组件化 / 模块化实践总结

  • 组件化方案

    组件化方案引用 在现有工程中实施基于CTMediator的组件化方案 iOS组件化实践(一):简介 iOS组件化实...

  • iOS组件化实践过程

    创建私有库的索引文件repoA:pod repo add repoA repoA_url创建私有库podA:p...

  • iOS 组件化/模块化文章

    1.博客文章总结 iOS组件化思路-大神博客研读和思考iOS组件化实践方案-LDBusMediator炼就组件化架...

  • iOS组件化储备

    资料 组件化/模块化 蜂鸟商家版 iOS 组件化 / 模块化实践总结 模块化与解耦 浅析 iOS 应用组件化设计 ...

  • ios 组件化

    参考 iOS 组件化实践《二》基于现有项目拆分组件化实践 在现有工程中实施基于CTMediator的组件化方案 i...

  • iOS组件化开发实践

    iOS组件化开发实践 iOS组件化开发实践

  • iOS组件化

    iOS组件化 iOS组件化

  • 《iOS组件化》组件化实践

    前述 体验过牵一发而动全身,编译5分钟之后,每次发版本都要被测试一顿臭骂之后。组件化的心愈发强烈。casa 的《i...

网友评论

      本文标题:iOS组件化实践过程

      本文链接:https://www.haomeiwen.com/subject/dadibltx.html