利用cocoapods創建基於git的私有庫Spec Repo


上一篇文章記錄了我利用cocoapods創建基於SVN的私有庫的全部過程,今天我再記錄一下基於git創建的過程。

整體先說明一下創建一個私有的podspec包括如下那么幾個步驟:

  1. 創建並設置一個私有的Spec Repo
  2. 創建Pod的所需要的項目工程文件,並且有可訪問的項目版本控制地址。
  3. 創建Pod所對應的podspec文件。
  4. 本地測試配置好的podspec文件是否可用。
  5. 向私有的Spec Repo中提交podspec
  6. 在個人項目中的Podfile中增加剛剛制作的好的Pod並使用。
  7. 更新維護podspec

在這一系列的步驟中需要創建兩個Git倉庫,分別是第一步和第二步(第二步不一定非要是Git倉庫,只要是可以獲取到相關代碼文件就可以,也可以是SVN的,也可以說zip包,區別就是在podspec中的source項填寫的內容不同),並且第一步只是在初次創建私有podspec時才需要,之后在創建其他的只需要從第二步開始就可以。

創建私有Spec Repo

什么是Spec Repo?他是所有的Pods的一個索引,就是一個容器,所有公開的Pods都在這個里面,他實際是一個Git倉庫,remote端GitHub上,當我們使用Cocoapods后它會被clone到本地的~/.cocoapods/repos目錄下,可以進入到這個目錄看到master文件夾就是這個官方的Spec Repo了。這個master目錄的結構是這個樣子的

因此我們需要創建一個類似於master的私有Spec Repo 。同理這個私有Spec Repo我們也要有一個遠程端。那么我們需要創建一個 Git倉庫,這個倉庫你可以創建私有的也可以創建公開的。如果是私有的話,項目中其他同事,你要給他這個Git倉庫的權限。

https://git.oschina.net(選擇右上角的+號,創建項目)

創建完成之后在Terminal中執行如下命令

命令格式# pod repo add [Private Repo Name] [GitHub HTTPS clone URL]

$ pod repo add yooweiTest https://git.oschina.net/yoowei/yooweiTest

詳情

$ defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder

$ pod repo add yoowei https://git.oschina.net/yoowei/yooweiTest

Cloning spec repo `yooweiTest` from `https://git.oschina.net/yoowei/yooweiTest`

Username for 'https://git.oschina.net': yoowei

Password for 'https://yoowei@git.oschina.net': 

輸入賬號碼雲的賬號密碼后,進入到~/.cocoapods/repos目錄下就可以看到yoowei這個目錄了。至此第一步創建私有Spec Repo完成。

PS:如果有其他合作人員共同使用這個私有Spec Repo的話在他有對應Git倉庫的權限的前提下執行相同的命令添加這個Spec Repo即可。

檢查是否安裝成功:
$ cd ~/.cocoapods/repos/yooweiTest $ pod repo lint .

注意第二個命令后面的 "."不能省。

創建Pod項目工程文件

這個第二步沒有什么好介紹的,如果是有現有的組件項目,並且在Git的版本管理下,那么這一步就算完成了,可以直接進行下一步了。如果沒有的話,可以使用Cocoapods提供的一個工具將第二步與第三步結合起來做。

現在來說一下這個工具,相關的文檔介紹是Using Pod Lib Create 就拿我創建的yooweiTestLibrary為例子具體講一下這里是如何操作的,先cd到要創建項目的目錄然后執行

$ cd /Users/galahad/Desktop/yooweiTesting 

$ pod lib create yooweiTestLibrary

Cloning `https://github.com/CocoaPods/pod-template.git` into `yooweiTestLibrary`.

Configuring yooweiTestLibrary template.

! Before you can create a new library we need to setup your git credentials.

 What is your name? 

 > yoowei

! Setting your name in git to yoowei

  git config user.name "yoowei"

 What is your email?

 > yoowei@126.com

! Setting your email in git to yoowei@126.com

  git config user.email "yoowei@126.com"

------------------------------

To get you started we need to ask a few questions, this should only take a minute.

2017-01-16 11:19:40.625 defaults[86074:448157] 

The domain/default pair of (org.cocoapods.pod-template, HasRunbefore) does not exist

If this is your first time we recommend running through with the guide: 

 - http://guides.cocoapods.org/making/using-pod-lib-create.html

 ( hold cmd and double click links to open in a browser. )

 Press return to continue.

What language do you want to use?? [ Swift / ObjC ]

 > Objc

Would you like to include a demo application with your library? [ Yes / No ]

 > Yes

Which testing frameworks will you use? [ Specta / Kiwi / None ]

 > Specta

Would you like to do view based testing? [ Yes / No ]

 > Yes

What is your class prefix?

 > WY

Running pod install on your new library.

Analyzing dependencies

Fetching podspec for `yooweiTestLibrary` from `../`

Downloading dependencies

Installing Expecta (1.0.5)

Installing Expecta+Snapshots (3.0.0)

Installing FBSnapshotTestCase (2.1.4)

Installing Specta (1.0.5)

Installing yooweiTestLibrary (0.1.0)

Generating Pods project

Integrating client project

[!] Please close any current Xcode sessions and use `yooweiTestLibrary.xcworkspace` for this project from now on.

Sending stats

Pod installation complete! There are 5 dependencies from the Podfile and 5 total pods installed.

Ace! you're ready to go!

We will start you off by opening your project in Xcode

open 'yooweiTestLibrary/Example/yooweiTestLibrary.xcworkspace'

To learn more about the template see `https://github.com/CocoaPods/pod-template.git`.

To learn more about creating a new pod, see `http://guides.cocoapods.org/making/making-a-cocoapod`.

項目生成的目錄結構及相關介紹如下:

MacBook:yooweiTesting yoowei$ tree -L 3

.

└── yooweiTestLibrary

    ├── Example

    │   ├── Podfile

    │   ├── Podfile.lock

    │   ├── Pods

    │   ├── Tests

    │   ├── yooweiTestLibrary

    │   ├── yooweiTestLibrary.xcodeproj

    │   └── yooweiTestLibrary.xcworkspace

    ├── LICENSE

    ├── README.md

    ├── _Pods.xcodeproj -> Example/Pods/Pods.xcodeproj

    ├── yooweiTestLibrary

    │   ├── Assets     //資源文件

    │   └── Classes    //類文件

    └── yooweiTestLibrary.podspec

11 directories, 5 files

接下來就是向yooweiTestLibrary組件文件夾中添加庫文件和資源,並配置podspec文件,我測試的時候把一個UIAlertView分類放入yooweiTestLibrary/Classes中,然后進入Example文件夾執行pod update命令,再打開項目工程可以看到,剛剛添加的組件已經在Pods子工程下Development Pods/yooweiTestLibrary中了。之所以是Development Pods/PodTestLibrary中,這是因為我們是在本地測試,而沒有把podspec文件添加到Spec Repo中的緣故。

注:這里需要注意的是每當你向yooweiTestLibrary中添加了新的文件或者以后更新了podspec的版本都需要重新執行一遍pod update命令。

通過Cocoapods創建出來的目錄本身就在本地的Git管理下,我們需要做的就是給它添加遠端倉庫,同樣去GitHub或其他的Git服務提供商那里創建一個私有的倉庫,拿到SSH地址(這一步需要配置 SSH)

使用SSH方式加密連接過程如下(碼雲的相關方式):

 $ ssh-keygen

Generating public/private rsa key pair.

Enter file in which to save the key (/Users/galahad/.ssh/id_rsa): //直接回車,千萬不要輸入

/Users/galahad/.ssh/id_rsa already exists.

Overwrite (y/n)? y

Enter passphrase (empty for no passphrase): //輸入密碼,待會會用到

Enter same passphrase again: 

Your identification has been saved in /Users/galahad/.ssh/id_rsa.

Your public key has been saved in /Users/galahad/.ssh/id_rsa.pub.

The key fingerprint is:

省略......

The key's randomart image is:

省略......

$ cat ~/.ssh/id_rsa.pub        // 查看

省略......拿到以后在開源中國碼雲上面添加公鑰

$ ssh -T git@git.oschina.net   //連接(添加成功以后,這里進項連接)

Enter passphrase for key '/Users/galahad/.ssh/id_rsa':  //輸入剛才的那個密碼

Welcome to Git@OSC, yoowei!

一切OK

然后cd到yooweiTestLibrary項目目錄

將本地倉庫關聯到git遠程倉庫的詳細步驟

$ cd /Users/galahad/Desktop/yooweiTesting/yooweiTestLibrary 

$ git add .

$ git commit -s -m "Initial Commit of Library"

$ git remote add origin git@git.oschina.net:yoowei/yooweiTestLibrary.git

$ git push -u origin master    //報錯

Enter passphrase for key '/Users/galahad/.ssh/id_rsa':             //輸入密碼

To git.oschina.net:yoowei/yooweiTestLibrary.git

 ! [rejected]        master -> master (fetch first)

error: failed to push some refs to 'git@git.oschina.net:yoowei/yooweiTestLibrary.git'

hint: Updates were rejected because the remote contains work that you do

hint: not have locally. This is usually caused by another repository pushing

hint: to the same ref. You may want to first integrate the remote changes

hint: (e.g., 'git pull ...') before pushing again.

hint: See the 'Note about fast-forwards' in 'git push --help' for details.

$ git fetch

Enter passphrase for key '/Users/galahad/.ssh/id_rsa': 

From git.oschina.net:yoowei/yooweiTestLibrary

 * [new branch]      master     -> origin/master

$ git branch

* master

$ git push --force origin master    //直接強推,成功

Enter passphrase for key '/Users/galahad/.ssh/id_rsa': 

Counting objects: 324, done.

Delta compression using up to 4 threads.

Compressing objects: 100% (313/313), done.

Writing objects: 100% (324/324), 186.04 KiB | 0 bytes/s, done.

Total 324 (delta 74), reused 0 (delta 0)

remote: Resolving deltas: 100% (74/74), done.

To git.oschina.net:yoowei/yooweiTestLibrary.git

 + 66361fb...e9cc24c master -> master (forced update)

本地倉庫添加東西以后,測試

$ git status

$ git add .

$ git commit -m" 初始化"

$ git push 

fatal: The current branch master has no upstream branch.

To push the current branch and set the remote as upstream, use

     git push --set-upstream origin master

$ git push --set-upstream origin master

Enter passphrase for key '/Users/galahad/.ssh/id_rsa': 

Counting objects: 7, done.

Delta compression using up to 4 threads.

Compressing objects: 100% (7/7), done.

Writing objects: 100% (7/7), 17.74 KiB | 0 bytes/s, done.

Total 7 (delta 1), reused 0 (delta 0)

To git.oschina.net:yoowei/yooweiTestLibrary.git

   f2bf993..f2d3210  master -> master

Branch master set up to track remote branch master from origin.

本地倉庫添加圖片后(再次測試就OK了)

$ git status

$ git add .

$ git commit -m"添加圖片"

$ git push

Enter passphrase for key '/Users/galahad/.ssh/id_rsa': 

Counting objects: 5, done.

Delta compression using up to 4 threads.

Compressing objects: 100% (5/5), done.

Writing objects: 100% (5/5), 6.71 KiB | 0 bytes/s, done.

Total 5 (delta 1), reused 0 (delta 0)

To git.oschina.net:yoowei/yooweiTestLibrary.git

   f2d3210..a54adeb  master -> master

因為podspec文件中獲取Git版本控制的項目還需要tag號,

所以我們要打上一個tag

$ git tag -m "first release" 0.1.0

推送tags到遠程倉庫

$ git push --tags

$ git tag

0.1.0

接下來就開始編輯podspec文件了,它是一個Ruby的文件.

也可參考:http://www.cnblogs.com/richard-youth/p/6272932.html

編輯完podspec文件后,需要驗證一下這個文件是否可用

$ pod spec lint yooweiTestLibrary.podspec --verbose

以前測試的時候遇到過的錯誤:

 1、-> yooweiTestLibrary (0.1.0)

    - WARN  | summary: The summary is not meaningful.

    - WARN  | url: There was a problem validating the URL https://github.com/<GITHUB_USERNAME>/yooweiTestLibrary.

    - ERROR | [iOS] unknown: Encountered an unknown error ([!] /usr/bin/git clone https://github.com/<GITHUB_USERNAME>/yooweiTestLibrary.git /var/folders/rg/gmjp61bx0x95t4tjx2hh_3sr0000gn/T/d20170119-91250-1w5v7us --template= --single-branch --depth 1 --branch 0.1.0

Cloning into '/var/folders/rg/gmjp61bx0x95t4tjx2hh_3sr0000gn/T/d20170119-91250-1w5v7us'...

fatal: unable to access 'https://github.com/<GITHUB_USERNAME>/yooweiTestLibrary.git/': The requested URL returned error: 400

紅色的需要修改。

2、

 -> yooweiTestLibrary (0.1.0)

    - ERROR | [iOS] file patterns: The `resource_bundles` pattern for `yooweiTestLibrary` did not match any file.

原因是:

s.resource_bundles = {

  'yooweiTestLibrary' => ['yooweiTestLibrary/Assets/*.png']

 }

找不到任何文件,所以報錯,解決方式要么弄幾張圖片,要么先刪掉。

當你看到

yooweiTestLibrary.podspec passed validation.

時,說明驗證通過了,不過這只是這個podspec文件是合格的,不一定說明這個yooweiTestLibrary是可以用的,我們需要在本地做一下驗證,這就是第四步的內容了,第四步在具體說明。

創建podspec文件

如果從第二步過來,如果已經有了現成的項目,那么就給這個項目創建一個podspec文件。編輯完成之后使用驗證命令驗證一下。

具體操作參考:http://www.cnblogs.com/richard-youth/p/4704413.html

本地測試podspec文件

我們可以創建一個新的項目,在這個項目的Podfile文件中直接指定剛才創建編輯好的podspec文件,看是否可用。 在Podfile中我們可以這樣編輯,有兩種方式

其中yooweiTestLibrary.podspec的路徑為/Users/galahad/Desktop/yooweiTesting/yooweiTestLibrary/yooweiTestLibrary.podspec 

# 指定路徑的方式,注意到yooweiTestLibrary.podspec上一層文件夾就可以了

#pod 'yooweiTestLibrary', :path => '~/Desktop/yooweiTesting/yooweiTestLibrary'      

# 指定podspec文件(要具體到yooweiTestLibrary.podspec)

pod 'yooweiTestLibrary', :podspec => '~/Desktop/yooweiTesting/yooweiTestLibrary/yooweiTestLibrary.podspec'  

然后執行pod install命令安裝依賴,打開項目工程,可以看到庫文件都被加載到Pods子項目中了。

中間測試過程中遇到部分錯誤,通過修改.Podspec文件就可以解決。

在項目中編寫代碼,測試庫文件無誤后就可以開始下一步了,提交podspecSpec Repo

Spec Repo提交podspec

Spec Repo提交podspec需要完成兩點一個是podspec必須通過驗證無誤,再一個就是刪掉無用的注釋(規范,但不必須)。 向我們的私有Spec Repo提交podspec只需要一個命令

pod repo push [本地Spec Repo名稱][podspec文件路徑]

$ pod repo push yooweiTest ~/Desktop/yooweiTesting/yooweiTestLibrary/yooweiTestLibrary.podspec

完成之后這個組件庫就添加到我們的私有Spec Repo中了,可以進入到~/.cocoapods/repos/yooweiTest目錄下查看

可能會出現的問題是:

Validating spec

Cloning spec repo `-1` from ``

[!] Unable to add a source with url `` named `-1`.

You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

網上資料說,是裝了多個Xcode導致路徑變了,

解決:

$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

注意這個路徑可以通過終端拉文件得到:/Applications/Xcode.app/Contents/Developer

$ pod update --no-repo-update

$ pod install --verbose --no-repo-update

真是蛋疼,所有的方法用盡了還是(以后有機會再重新試試?)

[!] Unable to add a source with url `` named `-1`.

You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

那我就真手動了,前往~/.cocoapods/repos文件夾找到yoowei文件夾

其組成方式是  

specName  ——   版本version ——  specName.podspec  

$ cd /Users/galahad/.cocoapods/repos/yooweiTest

$ tree -L 3

.

├── LICENSE

├── README.md

└── yooweiTestLibrary

    └── 0.1.0

        └── yooweiTestLibrary.podspec

 2 directories, 3 files

然后

$ pod search yooweiTestLibrary

[!] Unable to find a pod with name, author, summary, or description matching `yooweiTestLibrary`

$ rm ~/Library/Caches/CocoaPods/search_index.json

$ pod search yooweiTestLibrary

Creating search index for spec repo 'master'.. Done!

Creating search index for spec repo 'net:443'.. Done!

Creating search index for spec repo 'yoowei'.. Done!

-> yooweiTestLibrary (0.1.0)

   測試yooweiTest

   pod 'yooweiTestLibrary', '~> 0.1.0'

   - Homepage: https://git.oschina.net

   - Source:   https://git.oschina.net/yoowei/yooweiLibrary.git

   - Versions: 0.1.0 [yoowei repo]

這里說的是添加到私有的Repo,如果要添加到Cocoapods的官方庫了,可以使用trunk工具。

可以參考:http://www.cnblogs.com/richard-youth/p/4704413.html

使用制作好的yooweiTestLibrary

我們在正式項目中使用這個私有的yooweiTestLibrary,在項目的Podfile里增加以下一行代碼

pod 'yooweiTestLibrary', '~> 0.1.0'

$ pod install

之后發現不正常現象

Analyzing dependencies

[!] Unable to find a specification for `yooweiTestLibrary (~> 0.1.0)`

原因:

如果你不指定來源的話,pod install只會在master下搜索有沒有,而我們的yooweiTestLibrary.podspec文件在yoowei下面,當然找不到了!

解決方式

在podfile文件最上方添加

source 'https://git.oschina.net/yoowei/yooweiTest'  #我們自己的私有spec倉庫的地址

source 'https://github.com/CocoaPods/Specs.git'    #官方倉庫的地址

默認情況下,如果你不添加source的話,系統會默認使用 https://github.com/CocoaPods/Specs.git 官方源,但是當你添加了source后,系統就不再自動搜索官方源,所以這兩句都必須添加!!!!!

怎么查看本地有幾個repo

$ pod repo

master

- Type: git (master)

- URL:  https://github.com/CocoaPods/Specs.git

- Path: /Users/galahad/.cocoapods/repos/master

net:443

fatal: Not a git repository (or any of the parent directories): .git

- Type: local

- URL:  

- Path: /Users/galahad/.cocoapods/repos/net:443

yooweiTest

- Type: git (master)

- URL:  https://git.oschina.net/yoowei/yooweiTest

- Path: /Users/galahad/.cocoapods/repos/yooweiTest

3 repos

怎么刪除repos

刪除官方的repo,然后再重新下載
pod repo remove master
pod setup
其實直接找到以后,手動刪除就好了。

更新維護podspec

最后再來說一下制作好的podspec文件后續的更新維護工作,比如如何添加新的版本,如何刪除。

我已經制作好了yooweiTestLibrary的0.1.0版本,現在我對他進行升級工作,這次我添加了更多的模塊到yooweiTestLibrary之中,包括工具類,底層ModelUIKit擴展等,這里又嘗試了一下subspec功能,給yooweiTestLibrary創建了多個子分支。

具體做法是先將源文件添加到yooweiTestLibrary/Classes中,然后按照不同的模塊對文件目錄進行整理,因為我有四個模塊,所以在/yooweiTestLibrary/Classes下有創建了四個子目錄,完成之后繼續編輯之前的yooweiTestLibrary.podspec,這次增加了subspec特性

Pod::Spec.new do |s|

s.name             = 'yooweiTestLibrary'

s.version          = '0.1.0'

s.summary          = '測試yooweiTest'

s.description      = <<-DESC

TODO: Add long description of the pod here.

DESC

s.homepage         = 'https://git.oschina.net/yoowei'

s.license          = { :type => 'MIT', :file => 'LICENSE' }

s.author           = { 'yoowei' => 'wyhist2012@126.com' }

s.platform     = :ios, "8.0"

s.source           = { :git => 'https://git.oschina.net/yoowei/yooweiTestLibrary.git', :tag => s.version }

s.requires_arc = true

# s.source_files = 'yooweiTestLibrary/Classes/**/*'

# s.resource_bundles = {

#   'yooweiTestLibrary' => ['yooweiTestLibrary/Assets/*.png']

#  }

# s.public_header_files = 'yooweiTestLibrary/Classes/**/*.h'

 

s.subspec 'NetWorkEngine' do |networkEngine|

networkEngine.source_files = 'yooweiTestLibrary/Classes/NetworkEngine/**/*'

networkEngine.public_header_files = 'yooweiTestLibrary/Classes/NetworkEngine/**/*.h'

networkEngine.dependency 'AFNetworking', '~> 2.3'

end

 

s.subspec 'DataModel' do |dataModel|

dataModel.source_files = 'yooweiTestLibrary/Classes/DataModel/**/*'

dataModel.public_header_files = 'yooweiTestLibrary/Classes/DataModel/**/*.h'

end

 

s.subspec 'CommonTools' do |commonTools|

commonTools.source_files = 'yooweiTestLibrary/Classes/CommonTools/**/*'

commonTools.public_header_files = 'yooweiTestLibrary/Classes/CommonTools/**/*.h'

commonTools.dependency 'OpenUDID', '~> 1.0.0'

end

 

s.subspec 'UIKitAddition' do |ui|

ui.source_files = 'yooweiTestLibrary/Classes/UIKitAddition/**/*'

ui.public_header_files = 'yooweiTestLibrary/Classes/UIKitAddition/**/*.h'

ui.resource = "yooweiTestLibrary/Assets/MLSUIKitResource.bundle"

ui.dependency 'yooweiTestLibrary/CommonTools' #注意這個yooweiTestLibrary這個是本框架的名字,這里需要優化?

end

 

s.frameworks = 'UIKit'

#s.dependency 'AFNetworking', '~> 2.3'

#s.dependency 'OpenUDID', '~> 1.0.0'

end

因為我們創建了subspec所以項目整體的依賴dependency,源文件source_files,頭文件public_header_files,資源文件resource等都移動到了各自的subspec中,每個subspec之間也可以有相互的依賴關系,比如UIKitAddition就依賴於CommonTools

編輯完成之后,在測試項目yooweiTestLibrary里pod update一下(只要改東西就要pod update),幾個子項目都被加進項目工程了,寫代碼驗證無誤之后,就可以將這個工程push到遠端倉庫,並打上新的tag->1.0.0

$ git tag -m "reNew" 0.2.0

推送tags到遠程倉庫

$ git push --tags

$ git tag

0.1.0

0.2.0

這個時候可以再次編輯podsepc文件(可以改版本號了比如0.3.0,改完后再提交,然后再tag0.3.0,最后再驗證)

最后再次使用pod spec lint驗證編輯好的podsepc文件,沒有自身的WARNING或者ERROR之后,就可以再次提交到Spec Repo中了,命令跟之前是一樣的

pod repo push [本地Spec Repo名稱][podspec文件路徑]

$ pod repo push yooweiTest ~/Desktop/yooweiTesting/yooweiTestLibrary/yooweiTestLibrary.podspec

之后再次到~/.cocoapods/repos/yooweiTest目錄下查看

├── LICENSE ├── yooweiTestLibrary
│   ├── 0.1.0 │  
│   └──
yooweiTestLibrary.podspec
│   └── 0.2.0 │  
└──yooweiTestLibrary.podspec
── README.md  3 directories, 4 files

已經有兩個版本了,可以使用pod search查找結果.同時,我們也要將這些push到遠程倉庫里面(管理podspec的遠程倉庫)。

完成這些之后,在實際項目中我們就可以選擇使用整個組件庫或者是組件庫的某一個部分了,對應的Podfile中添加的內容為

source 'https://github.com/CocoaPods/Specs.git' # 官方庫 

 source 'https://git.oschina.net/yoowei/yooweiTest' # 私有庫

platform :ios, '7.0'  pod 'yooweiTestLibrary/NetWorkEngine', '1.0.0' #使用某一個部分 

pod '
yooweiTestLibrary/UIKitAddition', '1.0.0'

pod 'yooweiTestLibrary', '1.0.0' #使用整個庫
 

最后介紹一下如何刪除一個私有Spec Repo,只需要執行一條命令即可

$ pod repo remove yooweiTest

這樣這個Spec Repo就在本地刪除了,我們還可以通過

$ pod repo add yoowei git@git.oschina.net:yoowei/yooweiTestLibrary.git

再把它給加回來。

如果我們要刪除私有Spec Repo下的某一個podspec怎么操作呢,此時無需借助Cocoapods,只需要cd~/.cocoapods/repos/yoowei目錄下,刪掉庫目錄

然后在將Git的變動push到遠端倉庫即可

參考文章:

http://blog.wtlucky.com/blog/2015/02/26/create-private-podspec/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM