gpt4 book ai didi

validation - Podspec 无法通过验证,但没有记录错误

转载 作者:行者123 更新时间:2023-12-02 23:09:54 24 4
gpt4 key购买 nike

我有一些非常相似的应用程序。因此,我想创建一个或一些包含所有常见可重用代码的私有(private) Pod。我的第一个版本包含一些使用 AFNetworking 的网络功能,还使用 ​​KeychainItemWrapper:

Pod::Spec.new do |s|

s.name = 'CommonLib'
s.version = '0.0.1'
s.homepage = '****'
s.summary = 'My Common lib'
s.description = 'Library with common code'
s.author = { "Rens Verhage" => "*****" }
s.platform = :ios, '5.0'
s.source = { :git => "ssh://****/CommonLib.git", :tag => s.version.to_s }
s.source_files = 'CommonLib/*.{h,m}'
s.requires_arc = true

s.dependency 'AFNetworking', '~> 1.3.1'
s.dependency 'KeychainItemWrapper', '~> 1.2'
end

运行 pod spec lint CommonLib.podspec 会给出一些警告和注释消息:

 -> CommonLib (0.0.1)
- WARN | Missing required attribute `license`.
- WARN | Missing license type.
- NOTE | [xcodebuild] AFNetworking/AFNetworking/AFHTTPClient.h:84:9: warning: SystemConfiguration framework not found in project, or not included in precompiled header. Network reachability functionality will not be available. [-W#pragma-messages]
- NOTE | [xcodebuild] AFNetworking/AFNetworking/AFHTTPClient.h:89:9: warning: MobileCoreServices framework not found in project, or not included in precompiled header. Automatic MIME type detection when uploading files in multipart requests will not be available. [-W#pragma-messages]
- NOTE | [xcodebuild] CommonLib/CommonLib/NSArray+NSArray_PerformSelector.m:19:35: warning: performSelector may cause a leak because its selector is unknown [-Warc-performSelector-leaks]
- NOTE | [xcodebuild] CommonLib/CommonLib/NSArray+NSArray_PerformSelector.m:19:51: note: used here
- WARN | [iOS] Unable to find a license file

Analyzed 1 podspec.

[!] The spec did not pass validation.

请注意,没有错误消息,但规范未通过验证。我真的不知道从这里该去哪里。对于我来说,缺少 SystemConfiguration 和 MobileCoreServices 框架的消息看起来像是一个错误。我尝试通过添加来修复此警告

s.ios.frameworks = 'MobileCoreServices', 'SystemConfiguration'

到我的 podspec,但这不起作用。

所以,两个问题合二为一:

  1. 是什么错误导致我的 podspec 无法通过验证?
  2. 如何修复有关缺少框架的警告?

最佳答案

最近我遇到了这个问题,添加 --allow-warnings 解决了这个问题。

pod spec lint MyProject.podspec --allow-warnings

关于validation - Podspec 无法通过验证,但没有记录错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18781019/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com