首页 > 移动平台 > 详细

iOS CocoaPods 版本安装问题

时间:2016-09-28 12:32:57      阅读:209      评论:0      收藏:0      [点我收藏+]

今天安装salesforce中的pods,这是里面的podfile

# Uncomment this line to define a global platform for your project
# platform :ios, 8.0

target Hellow2 do

source 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 版本安装问题

原文:http://www.cnblogs.com/breezemist/p/5915607.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!