当前位置:网站首页>. Podspec dependency problem handling

. Podspec dependency problem handling

2022-06-09 00:01:00 Loneliness under fireworks

Encounter a situation :

  • I use RxSwift, however RxSwift stay github Upper Department , Sometimes the network is bad
  • So I put RxSwift Pull me down Giee Warehouse , To facilitate better use
  • stay profile Add... When using
  pod 'RxSwift',  :git=> 'https://gitee.com/tripartite/RxSwift.git',  :tag=> '6.5.0' 
  pod 'RxCocoa',  :git=> 'https://gitee.com/tripartite/RxSwift.git',  :tag=> '6.5.0'

however pod install The lack of time has encountered a problem , One by one RxSwift No problem , however RxCocoa Always report an error

[!] CocoaPods could not find compatible versions for pod "RxRelay":
  In Podfile:
    RxCocoa (from `https://gitee.com/tripartite/RxSwift.git`, tag `6.5.0`) was resolved to 6.5.0, which depends on
      RxRelay (= 6.5.0)

None of your spec sources contain a spec satisfying the dependency: `RxRelay (= 6.5.0)`. 

 Insert picture description here

Problem cause analysis

RXSwift There are multiple under the original file .podspec
 Insert picture description here
Here's the picture , There is a dependency between them , open RxCocoa.podspec, You find RxCocoa Need to rely on RxSwift and RxRelay

  s.dependency 'RxSwift', '6.5.0'
  s.dependency 'RxRelay', '6.5.0'

 Insert picture description here

resolvent , Add dependency

Add dependency , then pod install , Problem solving

  pod 'RxSwift',  :git=> 'https://gitee.com/tripartite/RxSwift.git',  :tag=> '6.5.0'
  pod 'RxRelay',  :git=> 'https://gitee.com/tripartite/RxSwift.git',  :tag=> '6.5.0'
  pod 'RxCocoa',  :git=> 'https://gitee.com/tripartite/RxSwift.git',  :tag=> '6.5.0'

 Insert picture description here

原网站

版权声明
本文为[Loneliness under fireworks]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/159/202206082329075284.html