Podfile和***.podspec文件中'~> ***'的含义

Podfile文件中,pod 'UMengUShare','6.4.8'代表导入友盟的6.4.8版本的第三方库(或称组件)。
***.podspec文件中,s.dependency 'UMengUShare', ' 6.4.8'代表依赖友盟的6.4.8版本的第三方库(或称组件),实际导入这个库时也自动导入这个版本的第三方库。
Podfile文件中,pod 'UMengUShare','~> 6.4.8'代表导入友盟的6.4.8版本及该版本的子版本的第三方库(或称组件)。 ***.podspec文件中,s.dependency ‘UMengUShare’, ‘~> 6.4.8’`代表依赖友盟的6.4.8版本及该版本的子版本的第三方库(或称组件),实际导入这个库时也自动导入这个版本及该版本的子版本的的第三方库。

w1:BITPaylibraryManager的副本 jiaguoshang$ pod update --verbose --no-repo-updateUpdate all pods
  Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target
  `Pods-BITPaylibraryManager`: (``)

Resolving dependencies of `Podfile`

Comparing resolved specification to the sandbox manifest
  A UMengUShare

Downloading dependencies

-> Installing UMengUShare (6.4.8.2)
  > Copying UMengUShare from
  `/Users/jiaguoshang/Library/Caches/CocoaPods/Pods/Release/UMengUShare/6.4.8.2-370d1`
  to `Pods/UMengUShare`
  - Running pre install hooks

就这个简单的符号折腾了我三天才搞明白。因为UMengUShare的6.4.8的WXApiObject.h文件中有PayReq和PayResp的定义,而6.4.8.2版本没有。我Podfile文件中使用的pod 'UMengUShare','6.4.8'。而***.podspec文件中使用的是s.dependency ‘UMengUShare’, ‘~> 6.4.8’`。到你我做的私有库可以正常运行,而上传时一直失败。真是失之毫厘,谬以千里啊!

你可能感兴趣的:(ios,Podfile,***.podspec,'~>,***',支付组件,分享组件)