Enviar pesquisa
Carregar
做自己的可可豆夾 @ cocoahead.tw
•
8 gostaram
•
2,390 visualizações
Kai-Yuan Cheng
Seguir
Make a private cocoapod repo
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 39
Baixar agora
Baixar para ler offline
Recomendados
該怎麼樣(認真的)部署你的 Python Web 應用程式?
該怎麼樣(認真的)部署你的 Python Web 應用程式?
Andy Dai
CocoaPods private repo
CocoaPods private repo
Weizhong Yang
Github Actions
Github Actions
Weizhong Yang
Flutter 踩雷心得
Flutter 踩雷心得
Weizhong Yang
Git & Sourcetree 介紹
Git & Sourcetree 介紹
Adison wu
Why to choose laravel framework
Why to choose laravel framework
Bo-Yi Wu
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
Wen-Tien Chang
Docker 基礎介紹與實戰
Docker 基礎介紹與實戰
Bo-Yi Wu
Recomendados
該怎麼樣(認真的)部署你的 Python Web 應用程式?
該怎麼樣(認真的)部署你的 Python Web 應用程式?
Andy Dai
CocoaPods private repo
CocoaPods private repo
Weizhong Yang
Github Actions
Github Actions
Weizhong Yang
Flutter 踩雷心得
Flutter 踩雷心得
Weizhong Yang
Git & Sourcetree 介紹
Git & Sourcetree 介紹
Adison wu
Why to choose laravel framework
Why to choose laravel framework
Bo-Yi Wu
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
Wen-Tien Chang
Docker 基礎介紹與實戰
Docker 基礎介紹與實戰
Bo-Yi Wu
How to choose web framework
How to choose web framework
Bo-Yi Wu
Mercurial簡介與教學
Mercurial簡介與教學
芳本 林
COSCUP 2016 Laravel 部署工作坊 - 生態圈介紹
COSCUP 2016 Laravel 部署工作坊 - 生態圈介紹
Shengyou Fan
Yet another introduction to Git - from the bottom up
Yet another introduction to Git - from the bottom up
Wen-Tien Chang
美团点评技术沙龙06 - 滴滴移动端测试解耦工具实践
美团点评技术沙龙06 - 滴滴移动端测试解耦工具实践
美团点评技术团队
Visual Studio Code 快速上手指南
Visual Studio Code 快速上手指南
Shengyou Fan
[Modern Web Conf 2015] 給 PHP 開發者的 Composer 錦囊
[Modern Web Conf 2015] 給 PHP 開發者的 Composer 錦囊
Shengyou Fan
課程簡介
課程簡介
Shengyou Fan
Github简介及实用入门
Github简介及实用入门
Rongxing Liu
LaravelConf Taiwan 2017 單頁面應用與前後端分離開發
LaravelConf Taiwan 2017 單頁面應用與前後端分離開發
俊仁 陳
驗證與訊息
驗證與訊息
Shengyou Fan
Java Build Tool course in 2011
Java Build Tool course in 2011
Ching Yi Chan
使用 wagon + VS Code 輕鬆打造 Windows 平台 PHP/Laravel 開發環境
使用 wagon + VS Code 輕鬆打造 Windows 平台 PHP/Laravel 開發環境
Shengyou Fan
導入 Flutter 前你應該知道的事
導入 Flutter 前你應該知道的事
Weizhong Yang
[PHPConf Taiwan 2015] 跟著 Laravel 5.1 一起成為更好的 PHP 開發者
[PHPConf Taiwan 2015] 跟著 Laravel 5.1 一起成為更好的 PHP 開發者
Shengyou Fan
給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發
Weizhong Yang
Extend the Kubernetes API with CRD and Custom API Server
Extend the Kubernetes API with CRD and Custom API Server
inwin stack
Git and Github basic with SourceTree
Git and Github basic with SourceTree
Chu-Siang Lai
Beta testing with CI
Beta testing with CI
Liyao Chen
使用 Controller
使用 Controller
Shengyou Fan
Linux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledge
Angel Boy
合久必分,分久必合
合久必分,分久必合
Qiangning Hong
Mais conteúdo relacionado
Mais procurados
How to choose web framework
How to choose web framework
Bo-Yi Wu
Mercurial簡介與教學
Mercurial簡介與教學
芳本 林
COSCUP 2016 Laravel 部署工作坊 - 生態圈介紹
COSCUP 2016 Laravel 部署工作坊 - 生態圈介紹
Shengyou Fan
Yet another introduction to Git - from the bottom up
Yet another introduction to Git - from the bottom up
Wen-Tien Chang
美团点评技术沙龙06 - 滴滴移动端测试解耦工具实践
美团点评技术沙龙06 - 滴滴移动端测试解耦工具实践
美团点评技术团队
Visual Studio Code 快速上手指南
Visual Studio Code 快速上手指南
Shengyou Fan
[Modern Web Conf 2015] 給 PHP 開發者的 Composer 錦囊
[Modern Web Conf 2015] 給 PHP 開發者的 Composer 錦囊
Shengyou Fan
課程簡介
課程簡介
Shengyou Fan
Github简介及实用入门
Github简介及实用入门
Rongxing Liu
LaravelConf Taiwan 2017 單頁面應用與前後端分離開發
LaravelConf Taiwan 2017 單頁面應用與前後端分離開發
俊仁 陳
驗證與訊息
驗證與訊息
Shengyou Fan
Java Build Tool course in 2011
Java Build Tool course in 2011
Ching Yi Chan
使用 wagon + VS Code 輕鬆打造 Windows 平台 PHP/Laravel 開發環境
使用 wagon + VS Code 輕鬆打造 Windows 平台 PHP/Laravel 開發環境
Shengyou Fan
導入 Flutter 前你應該知道的事
導入 Flutter 前你應該知道的事
Weizhong Yang
[PHPConf Taiwan 2015] 跟著 Laravel 5.1 一起成為更好的 PHP 開發者
[PHPConf Taiwan 2015] 跟著 Laravel 5.1 一起成為更好的 PHP 開發者
Shengyou Fan
給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發
Weizhong Yang
Extend the Kubernetes API with CRD and Custom API Server
Extend the Kubernetes API with CRD and Custom API Server
inwin stack
Git and Github basic with SourceTree
Git and Github basic with SourceTree
Chu-Siang Lai
Beta testing with CI
Beta testing with CI
Liyao Chen
使用 Controller
使用 Controller
Shengyou Fan
Mais procurados
(20)
How to choose web framework
How to choose web framework
Mercurial簡介與教學
Mercurial簡介與教學
COSCUP 2016 Laravel 部署工作坊 - 生態圈介紹
COSCUP 2016 Laravel 部署工作坊 - 生態圈介紹
Yet another introduction to Git - from the bottom up
Yet another introduction to Git - from the bottom up
美团点评技术沙龙06 - 滴滴移动端测试解耦工具实践
美团点评技术沙龙06 - 滴滴移动端测试解耦工具实践
Visual Studio Code 快速上手指南
Visual Studio Code 快速上手指南
[Modern Web Conf 2015] 給 PHP 開發者的 Composer 錦囊
[Modern Web Conf 2015] 給 PHP 開發者的 Composer 錦囊
課程簡介
課程簡介
Github简介及实用入门
Github简介及实用入门
LaravelConf Taiwan 2017 單頁面應用與前後端分離開發
LaravelConf Taiwan 2017 單頁面應用與前後端分離開發
驗證與訊息
驗證與訊息
Java Build Tool course in 2011
Java Build Tool course in 2011
使用 wagon + VS Code 輕鬆打造 Windows 平台 PHP/Laravel 開發環境
使用 wagon + VS Code 輕鬆打造 Windows 平台 PHP/Laravel 開發環境
導入 Flutter 前你應該知道的事
導入 Flutter 前你應該知道的事
[PHPConf Taiwan 2015] 跟著 Laravel 5.1 一起成為更好的 PHP 開發者
[PHPConf Taiwan 2015] 跟著 Laravel 5.1 一起成為更好的 PHP 開發者
給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發
Extend the Kubernetes API with CRD and Custom API Server
Extend the Kubernetes API with CRD and Custom API Server
Git and Github basic with SourceTree
Git and Github basic with SourceTree
Beta testing with CI
Beta testing with CI
使用 Controller
使用 Controller
Semelhante a 做自己的可可豆夾 @ cocoahead.tw
Linux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledge
Angel Boy
合久必分,分久必合
合久必分,分久必合
Qiangning Hong
GitLab—the new workbench
GitLab—the new workbench
tblanlan
Gitlab - the new workbench (2nd edition)
Gitlab - the new workbench (2nd edition)
Pu Shiming
愛創小小聚201307 小強分享
愛創小小聚201307 小強分享
iTrEnD
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
Edward Kuo
Nodejs & NAE
Nodejs & NAE
q3boy
DEV305 - ASP.NET 5 開發攻略
DEV305 - ASP.NET 5 開發攻略
Will Huang
開放原始碼 Ch2.1 app - oss - oss ide (ver1.2)
開放原始碼 Ch2.1 app - oss - oss ide (ver1.2)
My own sweet home!
NODEjs Lesson1
NODEjs Lesson1
3dmodeldiy
千呼萬喚始出來的 Java SE 7
千呼萬喚始出來的 Java SE 7
Justin Lin
⼤語⾔模型 LLM 應⽤開發入⾨
⼤語⾔模型 LLM 應⽤開發入⾨
Wen-Tien Chang
[3]投影片 futurewad樹莓派研習會 141204
[3]投影片 futurewad樹莓派研習會 141204
CAVEDU Education
出了问题不要靠猜
出了问题不要靠猜
LI Daobing
Artifacts management with CI and CD
Artifacts management with CI and CD
Chen-Tien Tsai
Software Engineer Talk
Software Engineer Talk
Larry Cai
Phalcon the fastest php framework 阿土伯
Phalcon the fastest php framework 阿土伯
Hash Lin
Phalcon phpconftw2012
Phalcon phpconftw2012
Rack Lin
SQL Server 資料庫版本控管
SQL Server 資料庫版本控管
Will Huang
Git&Github Tutorial
Git&Github Tutorial
Ting Wen Su
Semelhante a 做自己的可可豆夾 @ cocoahead.tw
(20)
Linux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledge
合久必分,分久必合
合久必分,分久必合
GitLab—the new workbench
GitLab—the new workbench
Gitlab - the new workbench (2nd edition)
Gitlab - the new workbench (2nd edition)
愛創小小聚201307 小強分享
愛創小小聚201307 小強分享
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
Nodejs & NAE
Nodejs & NAE
DEV305 - ASP.NET 5 開發攻略
DEV305 - ASP.NET 5 開發攻略
開放原始碼 Ch2.1 app - oss - oss ide (ver1.2)
開放原始碼 Ch2.1 app - oss - oss ide (ver1.2)
NODEjs Lesson1
NODEjs Lesson1
千呼萬喚始出來的 Java SE 7
千呼萬喚始出來的 Java SE 7
⼤語⾔模型 LLM 應⽤開發入⾨
⼤語⾔模型 LLM 應⽤開發入⾨
[3]投影片 futurewad樹莓派研習會 141204
[3]投影片 futurewad樹莓派研習會 141204
出了问题不要靠猜
出了问题不要靠猜
Artifacts management with CI and CD
Artifacts management with CI and CD
Software Engineer Talk
Software Engineer Talk
Phalcon the fastest php framework 阿土伯
Phalcon the fastest php framework 阿土伯
Phalcon phpconftw2012
Phalcon phpconftw2012
SQL Server 資料庫版本控管
SQL Server 資料庫版本控管
Git&Github Tutorial
Git&Github Tutorial
做自己的可可豆夾 @ cocoahead.tw
1.
做自己的可可豆夾 Objective-C 套件管理系統 cocoaheads.tw 2014 @Superbil
2.
About me • 軟體工工程師、iOS 開發 • Git
/ Emacs • about.me/superbil • freenode #emacs.tw #g0v.tw #python.tw
3.
目錄 • 什麼是 cocoapods • 建立一個 podspec • 建立屬於自己的私人
repo • 編寫 podspec 的注意事項 • Podspec 裡面的奇技 巧
4.
什麼是 cocoapods • 語意化版本 (Semantic
Versioning) 套件管理系統 • 快速( • 解決套件之間的相依性問題 懶)使用第三方元件
5.
為什麼要用 cocoapods • 語意化版本 (Semantic
Versioning) 套件管理系統 • • 快速( • • 多人協作的時候,知道該不該升級元件 懶)使用第三方元件 pod search <Make_a_wish> 解決套件之間的相依性問題 • duplicate symbols
6.
使用 cocoapods • gem install
cocoapods • • 建議先裝 homebrew,再裝ruby pod setup • 安裝完,設定 cocoapods 環境
7.
使用 cocoapods (2) • pod
init • 在當前目錄下面尋找 xcode project , 並建立一個 Podfile • pod install • 依照 Podfile 中的需求,安裝到 xcode project
8.
使用 cocoapods (3) • platform
:ios, '5.1' • xcodeproj `MyProject.xcodeproj` • pod 'JSONKit', • pod 'Reachability', '~> 3.0.0' '~> 1.4'
9.
更新 Pod • pod • • 依照目前(Podfile.lock)的 Pod
更新 pod update • 更新 Podfile 中的 Pods
10.
建立一個 podspec • podspec 表示一個單位 • pod
spec create <NAME> • 只建立 podspec ,其他流程都要動手做
11.
podspec Example
12.
自己做 Pod 流程 • 建立
pod spec create <NAME> • 增加 source code, example • 上傳 source code 並加上 git tag • 編寫 <NAME>.podspec • 驗證 pod spec lint <NAME>.podspec • 上傳 pod push origin <NAME>.podspec
13.
每一個 podspec 都要 樣做一次... 是一個需要耐心的過程
14.
pod lib create • 使用
pod lib create <NAME> • clone_template • • git clone pod-template <NAME> configure_template • ruby! "_CONFIGURE.rb <NAME>
15.
pod-template • • Assets CHANGELOG.md • NAME.podspec • POD_README.md • • Project Classes • • • • ios osx LICENSE Podfile • README.md • Rakefile • _CONFIGURE.rb
16.
pod lib 開發流程 • pod
lib create <NAME> • add source code and edit <NAME>.podspec • pod lib lint • pod push origin <NAME>.podspec
17.
建立自己的可可豆夾
18.
pod repo 結構 • $HOME/repos/master/ps_name/version/ ps_name.podspec • repo
使用 git 做管理
19.
pod repo add • pod
repo add NAME URL [BRANCH] • Clones `URL` in the local spec-repos directory at `~/.cocoapods/repos/`. The • remote can later be referred to by `NAME`.
20.
編寫 Podspec 的 注意事項
21.
語意化版本 (1) • pod 'JSONKit',
'~> 1.4' • • • 可以使用不同的限制條件 會自動安裝 1.x 版的升級 pod 'JSONKit', '~> 1.4.1' • 自動升級只到 1.4.x
22.
語意化版本 (2) • 主版號.次版號.修訂號 • 主版號:當你做了不相容的 API
修改 • 次版號:當你做了向下相容的功能性新增 • 修訂號:當你做了向下相容的問題修正
23.
pod lint 錯誤
(1) • WARN | Git sources should specify a tag • podspec 的 source 必需指到一個 tag
24.
pod lint 錯誤
(2) • WARN | The summary should end with proper punctuation. • summary 少了句號。
25.
pod lint 錯誤
(3) • pod lib lint 的檢查和 pod push origin <NAME>.podpsec 範圍不同 • 雖然 pod lib lint 雖然可以過,但是上傳的時候才 會出現錯誤
26.
先別說cocoapods 你知道相依性 ?
27.
相依性處理 • 盡可以把沒有相依性的元件先 整理出來 • 先把影嚮最小的做成一個 pod • subspec 裡面可以做一些簡單 的相依性處理 • 用
Category 去處理相依性
28.
Podspec 裡面的 奇技 巧
29.
spec.xcconfig • s.xcconfig = {
'HEADER_SEARCH_PATHS' => '"$ (SDKROOT)/usr/include/libxml2"' } • 在 Target 的 project 的 HEADER_SEARCH_PATHS 加上參數 • HEADER_SEARCH_PATHS 為 MyProject.pbxproj 中的值,非介面上顯示的
30.
spec.xcconfig • s.xcconfig = {
'OTHER_LDFLAGS' => '-ObjC' } • 手動加入 -ObjC 的 flags
31.
other link options • s.libraries
= 'xml2' • 會在 other link flags 加上 -llibxml2
32.
spec.compiler_flags • s.compiler_flags = '-DGDATA_IPHONE=1',
'DGTM_INCLUDE_OAUTH2=1' • 在 target project 中 compiler flags 加入自定義的 參數
33.
subspec • pod 'MyPodspec/Common' • 只要安裝 個 subspec
的方式
34.
spec.default • pod 'MyPodspec' • 預設會安裝的東西,會先安裝 spec
下的再 default_subspec 的東西
35.
resource 的相依性 • Pods-Target-resources.sh • • • 把 resource
複製到 Project 上 使用 subspec 來整理 resource spec.resource_bundles
36.
spec.source • spec.version 若是 0.0.1 • 使用
0.0.1, 使用 個 version, source 可以使 用 :commit => "ABCDEFG.yooooooo" • s.source = { :git => 'git://repo.git', :commit => 'git_commit_hash' } http://guides.cocoapods.org/syntax/podspec.html#source
37.
s.version 相容 • GData 已經有新版本,但是最新的程式碼在
trunk 上 • 建立特別的版號,然後把 podspec 放在自己的 repo 中 • pod 'GData', '~> 0.0.1-pp'
38.
spec.post_install • 在元件安裝完之後,要做一些 事情時 • def s.post_install(target) puts <<-TEXT //
mom, I am here ! TEXT end • find ~/.cocoapods/repos/ -type f -exec grep -nH e "post_install" {} +
39.
Ref • http://cocoapods.org/ • http://guides.cocoapods.org/syntax/podspec.html • https://github.com/CocoaPods/CocoaPods • https://github.com/CocoaPods/pod-template
Baixar agora