我正在尝试创建一个cocoapod,但不断出现此错误:
Unable to read the license file `LICENSE.txt` for the spec
'WhiteFlowerFactory (0.0.1)'
我的podspec代码:
spec.name = "WhiteFlowerFactory"
spec.version = "0.0.1"
spec.license = { :type => "MIT", :file => "LICENSE.txt" }
spec.source_files = "WhiteFlowerFactory/*.{swift}"
spec.platform = :ios
spec.ios.deployment_target = '11.0'
spec.swift_version = "5.0"
这是它出现在我的项目目录中的位置:
我尝试过的事情:
无论如何,我不断收到相同的错误。
我也收到一个单独的错误,并且不确定是否与该错误有关,但是为了防万一,我将在此处添加它:
[iOS] unknown: Encountered an unknown error (Could not find a `ios`
simulator (valid values: ). Ensure that Xcode -> Window -> Devices has
at least one `ios` simulator listed or otherwise add one.) during
validation.
我两个小时都遇到了这两个错误。我删除了Xcode 10.2和11.0 beta版以及所有模拟器和派生数据,只是重新安装了Xcode 10.3及其模拟器。仍然收到两个错误。
编辑:刚刚从cocoapods 1.6.1-> 1.7.5更新,第二个错误已解决,仍然收到许可证错误:
Validating spec
-> WhiteFlowerFactory (0.0.1)
- WARN | [iOS] license: Unable to find a license file
- NOTE | xcodebuild: note: Using new build system
- NOTE | [iOS] xcodebuild: note: Planning build
- NOTE | [iOS] xcodebuild: note: Constructing build description
[!] The `WhiteFlowerFactory.podspec` specification does not validate.
[!] Unable to read the license file `LICENSE.txt` for the spec `WhiteFlowerFactory (0.0.1)`