对依赖于其他 pods 的 pod 进行 linting podspec 时出错
Error linting podspec for a pod that has dependencies to other pods
我正在制作一个使用 public pods 的私有 pod,即 XCGLogger
、SSZipArchive
和 Firebase/Storage
。这是 podspec:
Pod::Spec.new do |s|
s.name = 'zLogger'
s.version = '0.1.0'
s.summary = 'A logger for iOS that will send the log zip file to Firebase Storage'
s.static_framework = true
s.description = <<-DESC
This is a library to log and send the zipped log file to Firebase Storage. The library is built on top of XCGLogger, SSZipArchive, and Firebase/Storage.
DESC
s.homepage = 'https://bitbucket.org/bawenang_zyrous/zlogger'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'bawenang.rukmoko' => 'bawenang.rukmoko@zyrous.com' }
s.source = { :git => 'https://bawenang_zyrous@bitbucket.org/bawenang_zyrous/zlogger.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.ios.deployment_target = '9.0'
s.source_files = 'zLogger/Classes/**/*'
# s.resource_bundles = {
# 'zLogger' => ['zLogger/Assets/*.png']
# }
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
s.dependency 'XCGLogger', '~> 7.0.1'
s.dependency 'SSZipArchive'
s.dependency 'Firebase'
s.dependency 'Firebase/Storage'
end
当我尝试对其进行 lint 时,它会抛出以下消息:
---------------------------------------------
Error loading the plugin `slather-2.4.7`.
Gem::ConflictError - Unable to activate slather-2.4.7, because activesupport-5.2.4.5 conflicts with activesupport (>= 4.0.2, < 5)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:2302:in `raise_if_conflicts'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1418:in `activate'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:93:in `safe_activate_and_require'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:31:in `block in load_plugins'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:in `map'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:in `load_plugins'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:326:in `block in run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:325:in `each'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:325:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
---------------------------------------------
-> zLogger (0.1.0)
- WARN | [iOS] swift: The validator used Swift `4.0` by default because no Swift version was specified. To specify a Swift version during validation, add the `swift_versions` attribute in your podspec. Note that usage of a `.swift-version` file is now deprecated.
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
- NOTE | xcodebuild: note: Using new build system
- NOTE | xcodebuild: note: Building targets in parallel
- NOTE | xcodebuild: note: Using codesigning identity override: -
- NOTE | [iOS] xcodebuild: note: Planning build
- NOTE | [iOS] xcodebuild: note: Constructing build description
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'nanopb' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'XCGLogger' from project 'Pods')
- ERROR | xcodebuild: /Users/bawenang/zLogger/zLogger/zLogger/Classes/LogFileSenderAdapter.swift:10:8: error: no such module 'Firebase'
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Firebase' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseAnalytics' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleAppMeasurement' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'ObjcExceptionBridging' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleUtilities' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleDataTransport' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseStorage' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseInstallations' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseCore' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')
Pods workspace available at `/var/folders/0t/xl5r053d2237cckk_ttg7slh0000gn/T/CocoaPods-Lint-20210405-11311-umx84x-zLogger/App.xcworkspace` for inspection.
[!] zLogger did not pass validation, due to 2 errors and 1 warning.
我该如何解决这个问题?谢谢。
在向 CocoaPods 的网站发布问题后,其中一个人说 Firebase
是一个伞形模块,不应用作 pod 的依赖项。所以我删除了 s.dependency 'Firebase'
并将行 import Firebase
更改为 import FirebaseCore
。错误已修复。
我正在制作一个使用 public pods 的私有 pod,即 XCGLogger
、SSZipArchive
和 Firebase/Storage
。这是 podspec:
Pod::Spec.new do |s|
s.name = 'zLogger'
s.version = '0.1.0'
s.summary = 'A logger for iOS that will send the log zip file to Firebase Storage'
s.static_framework = true
s.description = <<-DESC
This is a library to log and send the zipped log file to Firebase Storage. The library is built on top of XCGLogger, SSZipArchive, and Firebase/Storage.
DESC
s.homepage = 'https://bitbucket.org/bawenang_zyrous/zlogger'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'bawenang.rukmoko' => 'bawenang.rukmoko@zyrous.com' }
s.source = { :git => 'https://bawenang_zyrous@bitbucket.org/bawenang_zyrous/zlogger.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.ios.deployment_target = '9.0'
s.source_files = 'zLogger/Classes/**/*'
# s.resource_bundles = {
# 'zLogger' => ['zLogger/Assets/*.png']
# }
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
s.dependency 'XCGLogger', '~> 7.0.1'
s.dependency 'SSZipArchive'
s.dependency 'Firebase'
s.dependency 'Firebase/Storage'
end
当我尝试对其进行 lint 时,它会抛出以下消息:
---------------------------------------------
Error loading the plugin `slather-2.4.7`.
Gem::ConflictError - Unable to activate slather-2.4.7, because activesupport-5.2.4.5 conflicts with activesupport (>= 4.0.2, < 5)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:2302:in `raise_if_conflicts'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1418:in `activate'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:93:in `safe_activate_and_require'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:31:in `block in load_plugins'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:in `map'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:in `load_plugins'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:326:in `block in run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:325:in `each'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:325:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
---------------------------------------------
-> zLogger (0.1.0)
- WARN | [iOS] swift: The validator used Swift `4.0` by default because no Swift version was specified. To specify a Swift version during validation, add the `swift_versions` attribute in your podspec. Note that usage of a `.swift-version` file is now deprecated.
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
- NOTE | xcodebuild: note: Using new build system
- NOTE | xcodebuild: note: Building targets in parallel
- NOTE | xcodebuild: note: Using codesigning identity override: -
- NOTE | [iOS] xcodebuild: note: Planning build
- NOTE | [iOS] xcodebuild: note: Constructing build description
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'nanopb' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'XCGLogger' from project 'Pods')
- ERROR | xcodebuild: /Users/bawenang/zLogger/zLogger/zLogger/Classes/LogFileSenderAdapter.swift:10:8: error: no such module 'Firebase'
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Firebase' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseAnalytics' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleAppMeasurement' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'ObjcExceptionBridging' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleUtilities' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleDataTransport' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseStorage' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseInstallations' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseCore' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')
Pods workspace available at `/var/folders/0t/xl5r053d2237cckk_ttg7slh0000gn/T/CocoaPods-Lint-20210405-11311-umx84x-zLogger/App.xcworkspace` for inspection.
[!] zLogger did not pass validation, due to 2 errors and 1 warning.
我该如何解决这个问题?谢谢。
在向 CocoaPods 的网站发布问题后,其中一个人说 Firebase
是一个伞形模块,不应用作 pod 的依赖项。所以我删除了 s.dependency 'Firebase'
并将行 import Firebase
更改为 import FirebaseCore
。错误已修复。