CocoaPods

2018-07-24  本文已影响0人  ledka

pod install & pod update

下面使用SDWebImage做示例,pod install、pod update均为第一次使用,使用pod search列出cocoapods中的版本:

-> SDWebImage (5.0.0-beta)
   Asynchronous image downloader with cache support with an UIImageView
   category.
   pod 'SDWebImage', '~> 5.0.0-beta'
   - Homepage: https://github.com/rs/SDWebImage
   - Source:   https://github.com/rs/SDWebImage.git
   - Versions: 5.0.0-beta, 4.4.2, 4.4.1, 4.4.0, 4.3.3, 4.3.2, 4.3.1, 4.3.0,
   4.2.3, 4.2.2, 4.2.1, 4.2.0, 4.1.2, 4.1.1, 4.1.0, 4.0.0, 4.0.0-beta2,
   4.0.0-beta, 3.8.2, 3.8.1, 3.8.0, 3.7.6, 3.7.5, 3.7.4, 3.7.3, 3.7.2, 3.7.1,
   3.7.0, 3.6, 3.5.4, 3.5.2, 3.5.1, 3.5, 3.4, 3.3, 3.2, 3.1, 3.0, 2.7.4, 2.7,
   2.6, 2.5, 2.4 [master repo]
   - Subspecs:
     - SDWebImage/Core (5.0.0-beta)
     - SDWebImage/MapKit (5.0.0-beta)
     - SDWebImage/WebP (5.0.0-beta)
Podfile pod install pod update
pod 'SDWebImage', '4.3.0' 4.3.0 4.3.0
pod 'SDWebImage', '> 4.3.0' 4.4.2 4.4.2
pod 'SDWebImage', '< 4.3.0' 4.2.3 4.2.3
pod 'SDWebImage', '~> 4.3.0' 4.3.3 4.3.3

pod outdated

pdating spec repo `master`
Analyzing dependencies
The color indicates what happens when you run `pod update`
<green>      - Will be updated to the newest version
<blue>   - Will be updated, but not to the newest version because of specified version in Podfile
<red>        - Will not be updated because of specified version in Podfile

The following pod updates are available:
- SDWebImage 4.3.0 -> 4.3.3 (latest version 5.0.0-beta)

Podfile.lock

Podfile

pod 'SDWebImage', '4.3.0'

使用pod install, Podfile.lock中是4.3.0,修改Podfile

pod 'SDWebImage', '~> 4.3.0'

使用命令pod install, 版本依旧是4.3.0;
使用命令pod update,版本变为4.3.3。

上一篇下一篇

猜你喜欢

热点阅读