I want to know what the "~>" is used for,cause I find they are the same below:
pod 'AFNetworking','~> 2.0.3'
pod 'AFNetworking','2.0.3'
I want to know what the "~>" is used for,cause I find they are the same below:
pod 'AFNetworking','~> 2.0.3'
pod 'AFNetworking','2.0.3'
~>
(optimistic运算符)用于指定"直到下一个major | minor | patch"的版本.例如:
~> 0.1.2
将为您提供up to 0.2版(但不包括0.2及更高版本)
~> 0.1
将为您提供up to 1.0版(但不包括1.0及更高版本)
~> 0
会给你一个0 and higher的版本(就像它被省略一样)
其中0.1.2
的意思是"我想要这个完全一样的版本"