IOS 本地私有庫創建(2)

1.在桌面新建個文件

/Users/xuzhenzhen/Desktop/本地私有庫/Local/testPerson/Classes

2. 添加git

2.1進入 /Users/xuzhenzhen/Desktop/本地私有庫/Local/testPerson 文件夾

git init

git add .

git commit -m ‘x’

因爲是本地倉庫 不需要上傳到遠程倉庫

pod spec create testPerson//注意spec文件名稱與倉庫名稱保持一致

2.2接下來修改下spec描述文件

需要注意的是

spec.source       = { :git => "http://EXAMPLE/testPerson.git", :tag => "#{spec.version}" }

修改爲

spec.source       = { :git => "", :tag => "#{spec.version}" }

spec.exclude_files = "Classes/Exclude"註釋掉

3.終端進入test文件夾下,使用pod 引入

3.1pod init 完成之後打開生成的podfile文件

修改內容如下

# platform :ios, '9.0'

target 'test' do

  use_frameworks!

#代表,到時候尋找,會到某個路徑下嗎,找一個文件testPerson.podspec

  pod 'testPerson',:path=> '../testPerson'

end

3.2 pod install 安裝成功

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章