iOS SDK released to developers --- cocoapods

1, create a repository on GitHub

Is not created

 

 

 Successfully created cloned into local

 

2, will host the SDK uploaded to GitHub and publish to cocoapods

Own SDK uploaded to GitHub, my path directly below, to prevent back

spec.source_files written into the pit

 

 

 3, pod commonly used commands

   Registration pod account

   pod trunk register [email protected] "bing"

  查看注册信息

pod trunk me
# 添加其他维护者
pod trunk add-owner XXXSDK [email protected] # 删除已发的版本 pod trunk delete XXXSDK 版本号 # 删除某个pod pod trunk deprecate XXXSDK # 删除其他维护者 pod trunk remove-owner XXXSDK 56789@qq.

4, registered pod account

Here at pod trunk register with a registered account, then you will receive an e-mail verification

use

pod trunk me to view account information

 

 

 5, upload cocoapods

You need to make a tag tags before uploading cocoapods

Verify podspec file is correct

Create and delete tag

git tag '1.0.0'
git push --tags
git tag -d 1.0.0
git push origin :refs/tags/1.0.0
创建podspec文件
使用pod spec create 文件名

参考

Pod::Spec.new do |spec|

spec.name = "LSWNovel" # Name

spec.version = "1.0.4" # version number

spec.summary = "Le Random House novels SDK" # Profile

spec.description = "Le Random House novels docking SDK documentation" # Description

spec.homepage = "https://github.com/yipainbingxin/LSWNovel"# project home address

spec.license = "MIT" # License

spec.author             = { "yipainbingxin" => "[email protected]" } #作者

# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

spec.platform =: ios, "8.0" # support minimum system version

spec.source = {: git => "https://github.com/yipainbingxin/LSWNovel.git",: tag => spec.version} address # project (note tag position here, you can write your own can be directly with s.version, but we must be unified and s.version)

 

# Spec.source_files = 'QiYouFNovel.framework / Headers / *. {H, m}' # source files need to include (and pit) according to your file hierarchy

spec.vendored_frameworks = 'LSWNovel.framework' # your SDK path (because preaching is a static library, this must be)

 

spec.resources = "Resource.bundle"

spec.frameworks = "Foundation", "UIKit" # dependent libraries

spec.dependency 'AFNetworking', '~> 3.2.1'

spec.dependency 'UIImage+Additions', '~> 2.1.4'

spec.dependency 'Masonry', '~> 1.1.0'

spec.dependency 'IQKeyboardManager', '6.4.2'

spec.dependency 'MJRefresh', '~> 3.2.0'

spec.dependency 'FSTextView', '~> 1.8'

spec.dependency 'SVProgressHUD', '~> 2.2.5'

spec.dependency 'MJExtension'

spec.dependency 'DZNEmptyDataSet'

spec.dependency 'dsBridge', '~> 3.0.6'

spec.dependency 'Reachability', '~> 3.2'

spec.dependency 'SDCycleScrollView', '~> 1.80'

spec.dependency 'ReactiveObjC'

spec.dependency 'Colours', '~> 5.13.0'

# Dependent third party, there are several write a few

end

6, local authentication Podspec

pod lib lint

Verification success

7, released cocoapods
输入 pod trunk push --allow-warnings命令来发布到cocoapods上,这可能需要几分钟时间。

 

 

 

 

 


 

Guess you like

Origin www.cnblogs.com/yipianbingxin/p/11578640.html