Вы находитесь на странице: 1из 21

Phạm Ngọc Hạnh

Team iOS
Oct 31 2017
1
NỘI DUNG

1. WHAT IS THE COCOAPODS

2. USING COCOAPODS

3. MAKE A COCOAPODS

4. DEMO

2
WHAT IS THE COCOAPODS

COCOAPODS

3
WHAT IS THE COCOAPODS

INSTALL

RubyGems Bundler

4
WHAT IS THE COCOAPODS

$ [sudo] gem install cocoapods

5
WHAT IS THE COCOAPODS

$ [sudo] gem install bundler

$ bundler init

source "https://rubygems.org"
ruby '~> 2.4.0'
gem 'cocoapods', '~> 1.2.0'

$ bundler install

6
USING COCOAPODS

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '10.0'


target 'TestBundle' do
use_frameworks!
pod 'Alamofile', '~> 3.0.5’
pod ‘Alamofile', '3.0'
pod 'Alamofile', '>=3.0'
pod 'Alamofire', :path => '~/Document/Alamofire'
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git',
:branch => ‘master'

end

7
MAKE A COCOAPODS

Create a Register Publish


Create
framewor cocoapod framewor
podspec
k trunk k

8
MAKE A COCOAPODS

9
MAKE A COCOAPODS

10
MAKE A COCOAPODS

11
MAKE A COCOAPODS

12
MAKE A COCOAPODS

$ pod spec create [namefile]

13
MAKE A COCOAPODS

Pod::Spec.new do |s|
s.name = "PNHSwift"
s.version = "0.0.1"
s.summary = "PNHSwift."
s.description = <<-DESC
PNHSwift is a framework test
DESC
s.homepage = "https://github.com/at-hanhpham/PNHSwift"
s.license = { "type" => "MIT", "file" => "LICENSE" }
s.author = { "Hanh Pham" => "hanh.pham@asiantech.vn" }
s.platform = :ios, "10.0"
s.source = { :git => “https://github.com/at-hanhpham/PNHSwift.git",
:tag => "#{s.version}" }
s.source_files = “PNHSwift/*.swift"
s.ios.frameworks = 'Foundation', ‘UIKit'
end

14
MAKE A COCOAPODS

$ pod spec lint

15
MAKE A COCOAPODS

$ pod trunk register hanh.pham@asiantech.vn ‘HanhPhamN’ —description=‘iMac’

16
MAKE A COCOAPODS

$ pod trunk push

17
MAKE A COCOAPODS

$ pod trunk register hanh.pham@asiantech.vn ‘HanhPhamN’ —description=‘iMac’

$ pod trunk me

$ pod trunk add-owner nameFramework email

18
18
MAKE A COCOAPODS

Update Framework

Create Update Register Update


tag pod spec cocoapod framewor
release file s trunk k

19
20
Q&A

Вам также может понравиться