iOS CocoaPods 版本安裝問題

來源:互聯網
上載者:User

標籤:

今天安裝salesforce中的pods,這是裡面的podfile

# Uncomment this line to define a global platform for your project# platform :ios, ‘8.0‘target ‘Hellow2‘ dosource ‘https://github.com/forcedotcom/SalesforceMobileSDK-iOS-Specs.git‘ # need to be first source ‘https://github.com/CocoaPods/Specs.git‘pod ‘React‘, :path => ‘./node_modules/react-native‘, :subspecs => [    ‘ART‘,    ‘RCTActionSheet‘,    ‘RCTAdSupport‘,    ‘RCTCameraRoll‘,    ‘RCTGeolocation‘,    ‘RCTImage‘,    ‘RCTNetwork‘,    ‘RCTPushNotification‘,    ‘RCTSettings‘,    ‘RCTText‘,    ‘RCTVibration‘,    ‘RCTWebSocket‘,    ‘RCTLinkingIOS‘]pod ‘SalesforceSDKCore‘pod ‘SalesforceNetwork‘pod ‘SalesforceRestAPI‘pod ‘SmartStore‘pod ‘SmartSync‘pod ‘SalesforceReact‘end
pod ‘SalesforceSDKCore‘ 這種寫法應該就是使用最新的版本,但是我使用pod install時,控制台有如下輸入:

 顯示的是4.2.0版本,之後我去https://github.com/forcedotcom/SalesforceMobileSDK-iOS-Specs.git 查看了一下,最新的版本是4.3.1

 

原來,雖然profile裡有source ‘https://github.com/forcedotcom/SalesforceMobileSDK-iOS-Specs.git‘,但是,這並不能保證本地的pods的 spec repo(描述倉庫)是新的,我們需要手動運行pod repo update 更新pods 的 spec repo,這樣系統才能從 spec repo中找到新版本的spec,進而才能下載到新的庫。

升級後,再運行 pod install 有:

已經可以正確讀取新的 spec檔案了!

 

在運行pod install 之前,最好在工程目錄下運行 pod repo update,更新pod的 spec 資訊。

 

iOS CocoaPods 版本安裝問題

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.