make a cocoapods lib

—2015.08.02—

error- ERROR | [watchOS] Returned an unsuccessful exit code. blabla

add flowing code in podspec

1
2
3
s.osx.deployment_target = '10.8'
s.ios.deployment_target = '6.0'
s.watchos.deployment_target = '2.0'

build on Xcode 7

—2014.11.05—

update lib

edit the NSString-BlockHelper.podspec add 1.0.1 version

1
2
git tag 1.0.1; git push --tags
pod trunk push NSString-BlockHelper.podspec --verbose

get error You need to register a session first.

1
2
3
pod trunk register <yourEmail> '<yourName>' --description='macbook pro'
#click the confirm email in yourEmail
pod trunk push NSString-BlockHelper.podspec --verbose

pod search cannot search the 1.0.1 version

but pod install in new project can install 1.0.1

—2014.08.29—

nshipster blog

http://guides.cocoapods.org/

Your First CocoaPod

demo : link

  1. create NSString-BlockHelper.podspec
1
2
3
4
5
6
7
8
9
10
11
Pod::Spec.new do |s|
s.name = 'NSString-BlockHelper'
s.version = '1.0.0'
s.license = { :type => 'MIT', :file => 'LICENSE.md' }
s.summary = "NSString+BlockHelper"
s.homepage = 'https://github.com/bumaociyuan/NSString-BlockHelper'
s.authors = { 'bumaociyuan' => 'http://bumaociyuan.github.io/' }
s.source = { :git => 'https://github.com/bumaociyuan/NSString-BlockHelper.git', :tag => s.version.to_s }
s.source_files = 'NSString+BlockHelper/*{h,m}'
s.requires_arc = true
end
  1. set the tag
    git tag 1.0.0; git push --tags
  1. use the cmd
    pod trunk push NSString-BlockHelper.podspec --verbose to push .podspec to repo