CocoaPods类库开发校验失败 - ShenYj/ShenYj.github.io GitHub Wiki
❯ pod lib lint SBLibrary.podspec
-> SBLibrary (0.3.2)
- WARN | url: There was a problem validating the URL https://github.com/ShenYj/SBLibrary.
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Using new build system
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Building targets in parallel
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Using codesigning identity override: -
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Planning build
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Constructing build description
- NOTE | [SBLibrary/Core,SBLibrary/UI] 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')
[!] SBLibrary did not pass validation, due to 1 warning (but you can use `--allow-warnings` to ignore it).
You can use the `--no-clean` option to inspect any issue.
❯ pod spec lint SBLibrary.podspec
-> SBLibrary (0.3.2)
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Using new build system
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Building targets in parallel
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Using codesigning identity override: -
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Planning build
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Constructing build description
- NOTE | [SBLibrary/Core,SBLibrary/UI] 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')
- ERROR | [iOS] [SBLibrary/UI] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
- ERROR | [SBLibrary/UI] xcodebuild: SBLibrary/SBLibrary/Classes/UI/Application+sbl.swift:30:26: error: cannot find type 'ApplicationSetable' in scope
Analyzed 1 podspec.
[!] The spec did not pass validation, due to 2 errors.
类库功能打开编写完成, 校验失败后, 本地修改重新推送到远程仓库后校验始终失败
我的第一印象是缓存的问题, 因为从报错来看, 我已经明确修改过了, 因此尝试了清除缓存, 并通过了校验
❯ pod cache clean SBLibrary
1: SBLibrary v0.3.2 (External)
2: SBLibrary v0.3.1 (Release)
Which pod cache do you want to remove?
2
❯ pod cache clean SBLibrary
❯ pod spec lint SBLibrary.podspec
-> SBLibrary (0.3.2)
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Using new build system
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Building targets in parallel
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Using codesigning identity override: -
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Planning build
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Constructing build description
- NOTE | [SBLibrary/Core,SBLibrary/UI] 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')
Analyzed 1 podspec.
SBLibrary.podspec passed validation.
❯ pod trunk push SBLibrary.podspec
Updating spec repo `trunk`
Validating podspec
-> SBLibrary (0.3.2)
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Using new build system
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Building targets in parallel
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Using codesigning identity override: -
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Planning build
- NOTE | [SBLibrary/Core,SBLibrary/UI] xcodebuild: note: Constructing build description
- NOTE | [SBLibrary/Core,SBLibrary/UI] 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')
Updating spec repo `trunk`
--------------------------------------------------------------------------------
🎉 Congrats
🚀 SBLibrary (0.3.2) successfully published
📅 March 3rd, 00:35
🌎 https://cocoapods.org/pods/SBLibrary
👍 Tell your friends!
--------------------------------------------------------------------------------
其实我直接清除掉1: SBLibrary v0.3.2 (External)
这一条应该就可以了