我有一个包含xcframework的pod库。这是podspec的定义:
Pod::Spec.new do |s|
s.name = 'MySDK'
s.version = '1.0.0'
s.summary = 'Summary'
s.description = 'Description'
s.homepage = 'homepage_url'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'xxxxx' => 'xxxxxx' }
s.source = { :git => 'xxxxxx' }
s.ios.deployment_target = '15.0'
s.source_files = 'MySDK/**/*.{swift,xcframework}''
s.vendored_frameworks = 'MySDK/Frameworks/MyFramework.xcframework'
s.preserve_paths = 'MySDK/Frameworks/MyFramework.xcframework'
s.xcconfig = { 'OTHER_LDFLAGS' => '-framework MyFramework' }
s.frameworks = 'UIKit', 'SwiftUI', 'XCTest', 'MyFramework'
s.dependency 'iOSDFULibrary', '~> 4.13.0'
end
字符串
当我使用 pod lib lint --allow-warnings --no-clean 验证pod时,结果很好:
MySDK通过验证。
但是当我使用 pod spec lint 验证pod时,我收到以下错误:
-> MySDK (1.0.0)
- ERROR | file patterns: The `preserve_paths` pattern did not match any file.
- ERROR | [iOS] file patterns: The `vendored_frameworks` pattern did not match any file.
- WARN | [iOS] license: Unable to find a license file
- 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 codesigning identity override: -
- NOTE | [iOS] xcodebuild: note: Building targets in dependency order
- NOTE | [iOS] xcodebuild: Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'iOSDFULibrary' from project 'Pods')
- NOTE | [iOS] xcodebuild: Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'ZIPFoundation' from project 'Pods')
- NOTE | [iOS] xcodebuild: note: Metadata extraction skipped. No AppIntents.framework dependency found. (in target 'ZIPFoundation' from project 'Pods')
- ERROR | [iOS] xcodebuild: MySDK/MySDK/MySDK/Classes/Managers/BluetoothStatusManager.swift:11:8: error: no such module 'MyFramework'
- NOTE | [iOS] xcodebuild: note: Metadata extraction skipped. No AppIntents.framework dependency found. (in target 'iOSDFULibrary' from project 'Pods')
Analyzed 1 podspec.
[!] The spec did not pass validation, due to 4 errors and 2 warnings.
型
提前感谢所有的回应!
1条答案
按热度按时间4sup72z81#
pod lib lint
使用本地计算机上的源。pod spec lint
使用指定的s.source
链接和s.version
标记获取要验证的源。