簡體   English   中英

如何安裝會影響其他Pod的新Pod?

[英]How to install new pods witout affecting other pods?

我的豆莢遇到問題。 我編輯了一些吊艙,當我使用“吊艙安裝”請求新吊艙時,將清理並重新安裝編輯的吊艙。 有沒有一種方法可以安裝新的Pod或更新特定的Pod而不影響其他Pod?

否。當您安裝新的Pod時,所有Pod都會被相應地重置。 如果您需要更改所需的API,則應該手動將其添加到項目中,而不是將其用作pod。

這樣,您可以添加任意數量的Pod,而不會影響該特定API,並且您的更改也將被正確保存。

實際上,有一種解決方法:只需在Podfile中指定Pod的確切版本即可。
例如:

Podfile:

# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'

target 'TestApp' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for TestApp
  pod 'RxSwift',    '4.1.2'
  pod 'RxCocoa',    '4.1.2'
  pod 'Alamofire',  '4.6'
  pod 'SwiftyJSON', '4.0'
  pod 'ObjectMapper', '3.1'
  pod 'SVProgressHUD', '2.2',  :inhibit_warnings => true
  pod 'IQKeyboardManagerSwift', '5.0.7'
  pod 'Validator', '3.0', :inhibit_warnings => true    
end

如您在我的Podfile中看到的,所有Pod都具有完全指定的版本(即,沒有〜>)。
因此,如果將您的Pod添加到這種Podfile中,則僅會安裝它,因為其他的Podfile已安裝。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM