標籤:
今天安裝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 版本安裝問題