MeetYouDevs / cocoapods-imy-bin

1.05k stars 245 forks source link

SDWebImage不指定版本号,或者使用~>符号,如何处理? #100

Closed miroda closed 3 years ago

miroda commented 3 years ago

SDWebImage不指定版本号,或者使用~>符号进行安装的时候,就会出现pod安装的版本号和私有源中的版本不一致,导致找不到版本的情况出现,请问这种情况如何处理?

pod 'SDWebImage', '~>5.9.4' pod 'SDWebImage'

`[!] CocoaPods could not find compatible versions for pod "SDWebImage": In snapshot (Podfile.lock): SDWebImage (= 5.10.2)

In Podfile: Demo (from ../../../ccbindemo/Demo.podspec) was resolved to 1, which depends on SDWebImage

You have either:

dabing1022 commented 3 years ago

私有源中的版本是啥?

miroda commented 3 years ago

私有源中还么有这个版本呢,我想通过pod bin auto 生成这个库

dabing1022 commented 3 years ago

源码私有源要先有,二进制私有源打完二进制会自动更新进去

miroda commented 3 years ago

流程是,我先pod install,安装5.10.2到本地,然后pod bin auto --all-make 这样子吗? 源码私有源,指的是什么?项目的源码吗

dabing1022 commented 3 years ago

提供podfile podspec

miroda commented 3 years ago

Pod::Spec.new do |s| s.name = 'Demo' s.version = '1' s.description = '我只是一个测试的,主要是想要 s.dependency' s.license = 'MIT' s.summary = 'Seeyou' s.homepage = 'https://github.com/meiyoudev/IMYPublic' s.authors = { 'suliangjin' => 'suliangjin@xiaoyouzi.com' } s.source = { :git => 'git@github.com:su350380433/cocaopods-imy-bin.git', :branch => 'dev' } s.requires_arc = true s.ios.deployment_target = '9.0' s.source_files = 'Source/*/.{h,m,c}' s.public_header_files = 'Source/*/.h'

    s.dependency 'Masonry'
    s.dependency 'FMDB'
    # s.dependency 'SocketRocket'
    s.dependency 'MJExtension','3.2.1'
    s.dependency 'SDWebImage','5.10.2'

end

miroda commented 3 years ago

Podfile source 'https://github.com/cocoapods/specs.git'

target 'Demo' do pod 'FMDB'
pod 'Masonry' pod 'MJExtension','3.2.1' pod 'SDWebImage','5.10.2' end

miroda commented 3 years ago

不指定版本号,不好处理,我先指定了一下版本号

dabing1022 commented 3 years ago

打包的时候最好指定下版本

miroda commented 3 years ago

现在已经指定版本了,一直报错

[!] CocoaPods could not find compatible versions for pod "SDWebImage": In snapshot (Podfile.lock): SDWebImage (= 5.10.2)

In Podfile: Demo (from ../../../ccbindemo/Demo.podspec) was resolved to 1, which depends on SDWebImage (= 5.10.2)

None of your spec sources contain a spec satisfying the dependencies: SDWebImage (= 5.10.2), SDWebImage (= 5.10.2).

You have either:

dabing1022 commented 3 years ago

先尝试pod repo update,确保github源、cdn源有5.10.2这个版本。

miroda commented 3 years ago

[!] ===【 SDWebImage | 5.10.2 】二进制组件制作完成 !!!