Latest 1.0.1
Homepage https://github.com/FelixWuFWD/podsdemoxxx
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit, Foundation

cocoapods 公开库创建demo

正文

注册 CocoaPods 账号

想创建开源的Pod库,就要注册一个CocoaPods账号,我们使用终端注册, email 用你的 GitHub 邮箱

$ pod trunk register GitHub_email ‘user_name’ –verbose

等终端出现下面文字,CocoaPods 会发一个 确认邮件 到你的邮箱上,登录你的邮箱进行确认。

[!] Please verify the session by clicking the link in the verification email that has been sent to [email protected]

注册成功!
确认后再终端输入

pod trunk me

创建Git仓库

在 GitHub 上创建一个公开项目,项目中必须包含这几个文件

  • LICENSE:开源许可证
  • _READE.me:仓库说明
  • 你的代码
  • xxxx.podspec:CocoaPods 的描述文件,这个文件 非常重要

Latest podspec

{
    "name": "podsdemoxxx",
    "version": "1.0.1",
    "license": "MIT",
    "summary": "podsdemoxxx is a demo to learn how to use cocoapods",
    "homepage": "https://github.com/FelixWuFWD/podsdemoxxx",
    "source": {
        "git": "https://github.com/FelixWuFWD/podsdemoxxx.git",
        "tag": "1.0.1"
    },
    "source_files": "podsdemoxxx/*.{h,m}",
    "requires_arc": true,
    "platforms": {
        "ios": "8.0"
    },
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "authors": "WuFan"
}

Pin It on Pinterest

Share This