【发布时间】:2016-10-17 04:14:25
【问题描述】:
我从一个流星应用程序(使用流星构建 ios...)构建了这个项目。
我已将其设置为使用 Swift 的旧版本(否则会出现很多错误)。但是当我尝试存档时,我在不同的位置收到此错误。
func cancel() { // Error: Ambiguous use of 'dispatch_sync(_:block)'
dispatch_sync(queue) {
self._cancel()
}
}
func dispatch_sync(queue: dispatch_queue_t, block: () throws -> ())throws { // 1. Found this candidate
var caughtError: ErrorType?
dispatch_sync(queue) {
do {
try block()
} catch {
caughtError = error
}
}
if let caughtError = caughtError {
throw caughtError
}
}
func cancel() { // 2. Found this candidate
dispatch_sync(queue) {
self._cancel()
}
}
我不知道怎么解决,你能帮帮我吗?
PS:我正在使用最新版本的 Xcode 和 MacOS Sierra。还有流星1.4.1.2
【问题讨论】:
标签: ios xcode meteor-ios