【发布时间】:2016-09-14 21:21:45
【问题描述】:
使用 Swift3 升级到 Xcode8 后,我发现 Cocoapods 不再支持这个了。所以我将 Cocoapods 升级到 beta 版本,即 1.1.0rc2。但是当我尝试 pod spec lint 时,发生了错误:
- ERROR | xcodebuild: WeatherKit/WeatherKit/DateComponents+InitFromString.swift:11:11: error: use of undeclared type 'DateComponents'
- ERROR | [iOS] xcodebuild: WeatherKit/WeatherKit/CityLoader.swift:14:13: error: use of undeclared type 'DispatchQueue'
- ERROR | [iOS] xcodebuild: WeatherKit/WeatherKit/CityLoader.swift:19:11: error: use of unresolved identifier 'DispatchQueue'
- WARN | [iOS] xcodebuild: WeatherKit/WeatherKit/DirectionUnit.swift:20:15: warning: extraneous '_' in parameter: 'value' has no keyword argument name
- WARN | [iOS] xcodebuild: WeatherKit/WeatherKit/DistanceUnit.swift:19:15: warning: extraneous '_' in parameter: 'value' has no keyword argument name
Analyzed 1 podspec.
[!] The spec did not pass validation, due to 20 errors and 2 warnings.
这 20 个错误都是关于 Swift3 语法的。但我使用的是 Xcode8,它应该允许所有这些语法
有人知道我可以用这个做什么吗?
【问题讨论】: