CocoaPods 更新慢&swift版本適配

來源:互聯網
上載者:User

標籤:style   參數   project   使用   第三方   target   適配   就會   tin   

一、更新慢的問題

使用CocoaPods來添加第三方類庫,無論是執行pod install還是pod update都卡在了Analyzing dependencies不動

原因在於當執行以上兩個命令的時候會升級CocoaPods的spec倉庫,加一個參數可以省略這一步,然後速度就會提升不少。

加參數的命令如下:

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

pod update --verbose --no-repo-update

 

二、我在swift工程用CocoaPods匯入第三方的時候,會有提示版本與你當前使用swift版本不匹配的問題

在Podfile中加上這段話可以限制匯入的第三方類庫的語言版本

post_install do |installer|

    installer.pods_project.targets.each do |target|

        target.build_configurations.each do |config|

            config.build_settings[‘SWIFT_VERSION‘] = ‘2.3‘

        end

    end

end

CocoaPods 更新慢&swift版本適配

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.