跳至主要内容

Cocoapods - Found multiple specifications warning

 原文链接

ocoapods found multiple specifications for master trunk
cocoapods unable to find specification
pod spec lint
unable to find a specification for umccommon
unable to find a specification for flipperkit
cocoapods version
podspec dependency private repo
fetch cocoapods specs

On pod install, I am getting warning like Found multiple specifications for "<Pod Name>"

It means that I have multiple Podspecs in this directory ~/cocoapods/repo

Example Podfile:

source '<Private Podspec>'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'

target 'SDKDemo' do
  use_frameworks!    
  pod '<Pod Name>'
end 

My question is that

  1. which Podspec will be used when installing pod.
  2. If Podspec is taken from <Private Podspec>, How it will work in this case
source 'https://github.com/CocoaPods/Specs.git'
source '<Private Podspec>'

I came to conclusion like order of source will affect deciding the Podspec. But I want to clarify this.


On my side, that approach (changing the order of the sources) never worked.

I needed to specify the source for my private pod in order to make it work. The reason is that my private pod registered in my private specs repo has the same name than another one registered in the public cocoapods specs repo.

i.e.:

source 'https://github.com/CocoaPods/Specs.git' # public cocoapods specs repo
source 'https://github.com/{:user}/specs.git' # my private specs repo

platform :ios, '11.0'

target 'MyAppTarget' do
  use_frameworks!
  # any other public pod ...
  pod 'PrivatePod', :source => 'https://github.com/{:user}/specs.git'
end

This is what solved my issue.

"Found multiple specifications" · Issue #2861 · CocoaPods , Whenever I pod install or push a new version to our private spec repo I get the error "Found multiple our private spec repo I get the error "Found multiple specifications", like this So the warning with master vs trunk like this: @welkinman! Ref: CocoaPods/CocoaPods#4363. Based on your output, it looks like you had two versions of the plugin installed. 2.0.0 and 2.0.1, according to the log


In Cocoapods version 1.8.x, I fixed this issue by changing the source from source 'https://github.com/CocoaPods/Specs.git' to source 'https://cdn.cocoapods.org/' in Podfile

It also depends on the errors that you receive. It is always useful to check in ~/.cocoapods/repos folder to see what repos are causing the warnings. It could be that you have two instances of your private podspec in ~/.cocoapods/repos. In my case I had this

[!] Found multiple specifications for `GoogleUtilities (6.2.4)`:
- /Users/hientran/.cocoapods/repos/master/Specs/0/8/4/GoogleUtilities/6.2.4/GoogleUtilities.podspec.json
- /Users/hientran/.cocoapods/repos/trunk/Specs/0/8/4/GoogleUtilities/6.2.4/GoogleUtilities.podspec.json

Simply remove master repo and I've never seen that warning since then

pod repo remove master

how to ignore warning & show error only when [pod update] · Issue , when I use [pod update --silent],cocoapods show a lot of warning like that: [!] Found multiple specifications for `UtilsPlugin4iOS (0.1.1.1)`:  This is what cocoapods is warning about, that the same pod with a same version is defined in two places. The podspecs are identical, so this will not cause issues when using any of the versions of the SDK for which this warning shows up.


The CocoaPods Guides have the answer:

The order of the sources is relevant. CocoaPods will use the highest version of a Pod of the first source which includes the Pod (regardless whether other sources have a higher version).

Whichever source you enter first will be the first source CocoaPods will look for the pod.

For Question #1: Since you have source '<Private Podspec>' first, that's what it will use.

For Question#2: Since you have source 'https://github.com/CocoaPods/Specs.git' first, that's what it will use.

https://guides.cocoapods.org/syntax/podfile.html#tab_source

Specs and the Specs Repo, One Pod, over the course of time, will have many Specs. It includes details Your podspec should pass without any errors or warnings. Update your library to​  so I try to use [pod update 1>/dev/null],it seems that cocoapods make waring to a stderr output? We made multipule specifications in order to ignore dependences in podspec,because it is a waste of time,we declare all dependence in podfile to make [pod update] action faster.


I had both source 'https://cdn.cocoapods.org/' and source 'https://github.com/CocoaPods/Specs.git' included in Podfile

source 'https://cdn.cocoapods.org/'
source 'https://github.com/CocoaPods/Specs.git'

After removing source 'https://github.com/CocoaPods/Specs.git' the warnings gone.

Solve the problem of pod dependency library conflict in EaseUI , In addition, the library with the same name will report a warning. [!] Found multiple specifications for `MWPhotoBrowser (2.1.2)`:. - /xxx/.cocoapods/repos/​ZXSpecs/  Warning Letter 320-19-42 . September 10, 2019 . Dear Mr. Sun Jia Quan: The U.S. Food and Drug Administration (FDA We found multiple differences in specifications and test methods. We also


"Found multiple specifications" - CocoaPods, Failed to install 'cordova-plugin-firebasex': Error: pod: Command failed with exit code 31. Appreciate your with the error : [!] Found multiple specifications for Crashlytics (3.14.0) : Not sure these are the warning or errors. <Test Specifications. As of CocoaPods 1.3.0 pods may now provide test specifications (or test specs for short). Test specifications can be used to describe the test sources for a given pod. Here's an example CoconutLib.podspec, an imaginary library that defines a test spec:


Cordova-plugin-firebase issues with ios - cordova, Warn users to delete the master specs repo if its not explicitly used. Fix: AppIcon not found when executing pod lib lint A pod built as a static library linked into multiple targets will only build as a module when all of the targets it is linked into  CocoaDocs receives notifications from the CocoaPods/Specs repo on GitHub whenever a CocoaPod is updated. This triggers a process that will generate documentation for objective-c projects via appledoc and host them for the community. This process can take around 15 minutes after your Podspec is merged.


CocoaPods/CocoaPods: The Cocoa Dependency Manager., The values will be merged with the default values that CocoaPods generates, overriding any duplicates. For library specs, the values will be merged into the generated Info.plist for libraries that are integrated using frameworks. It will have no effect for static libraries. Subspecs (other than app and test specs) are not supported.

评论

此博客中的热门博文

Resolving errSecInternalComponent errors during code signing

原文链接 One code signing issue I commonly see, both here on DevForums and in my Day Job™ with DTS, is that the codesign command fails with errSecInternalComponent. This issue crops up in a wide variety of circumstances and the correct fix depends on the specific problem. This post is my attempt to clarify the potential causes of this error and help folks resolve it. If you have any questions or comments about this, please start a new thread, tagging it with Code Signing so that I see it. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" Resolving errSecInternalComponent errors during code signing In some circumstances the codesign command might fail with the error errSecInternalComponent. For example: % codesign -s "Apple Development" "MyTrue" MyTrue: errSecInternalComponent This typically affects folks who are signing code in a nonstandard environm...

iOS:检测使用VPN或Proxy

参考链接: https://www.jianshu.com/p/c3b950dbf86a https://gist.github.com/PramodJoshi/4faad4c91f7dcb4eb9b06be8390c01db http://noodlecode.net/2018/04/check-if-ios-app-is-connected-to-vpn 第一种方法 需要导入框架CFNetwork 然后,这个方法是mrc的:需要添加-fno-objc-arc的flag 代码如下: + ( BOOL )getProxyStatus { NSDictionary *proxySettings = NSMakeCollectable ([( NSDictionary *) CFNetworkCopySystemProxySettings () autorelease]); NSArray *proxies = NSMakeCollectable ([( NSArray *) CFNetworkCopyProxiesForURL (( CFURLRef )[ NSURL URLWithString: @"http://www.google.com" ], ( CFDictionaryRef )proxySettings) autorelease]); NSDictionary *settings = [proxies objectAtIndex: 0 ]; NSLog ( @"host=%@" , [settings objectForKey:( NSString *)kCFProxyHostNameKey]); NSLog ( @"port=%@" , [settings objectForKey:( NSString *)kCFProxyPortNumberKey]); NSLog ( @"type=%@" , [settings objectForKey:( NSString *)kCFProxyTypeKey]); if ([[settings object...

去广告DNS设置,国内ADGuard DNS方案,手机电脑iOS去广告,保护隐私

 原文链接 之前分享过使用mac系统搭建adguard home,这几个月用下来零零散散基本上也被弃用了。主要原因是因为需要保持电脑一直开机。但是我的电脑是笔记本,存在移动各个地域的情况,也就是说只能够屏蔽电脑自身,对于手机而言不太现实。今天偶然发现dnspod推出了高级版的公共解析。dnspod背靠腾讯云,肯定是合法合规的公共解析服务,这个高级版用起来不错。 国内自己搭建解析服务是违法行为,所以这也是为什么使用dnspod的原因。 后台截图 开始使用 首先我们先进入dnspod的公共解析页面,点击开始使用。 专业版公共解析 dnspod会提供几种预设,我们选择「开发者」即可 开发者 然后你就成功的申请到自己个人使用的dns了! 更新拦截规则 我们可以将常见的广告过滤规则加入到dns中。我们在顶部选项卡中选择「拦截规则」。 拦截规则设置 打开adguard adguard 绑定iOS设备 推荐使用描述文件的方式,删除配置时删除描述文件即可。 描述文件 绑定macOS 推荐使用描述文件的方式,删除配置时删除描述文件即可。 描述文件 mac需要在「系统偏好设置」的「网络」中查看是否正在运行。 代理 如果没有运行需要点击「···」来启动服务。 启动服务 绑定路由器 找到自己路由器的DHCP设置,修改dns,然后记得绑定自己的ip。 修改dns 绑定ip 费用 目前有300万次/月的免费额度,但没有超出之后的价格。300万次一个人比较难用完,可以放心使用。 我个人使用iOS设备两台、智能家居、电脑两台,日均请求数大致2万/日。 判断是否搭建成功 可以通过查看日志的方式,日志大概有半小时到一小时的延迟,请耐心等待。