【问题标题】:I'm trying to archive a meteor-built ios app, but Xcode but I keep getting 'Ambiguous use of […]'我正在尝试归档一个由流星构建的 ios 应用程序,但 Xcode 但我不断收到“模糊使用 [...]”
【发布时间】: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


    【解决方案1】:

    将您的函数 dispach_sync 重命名为例如 dispatch_sync_mine

    【讨论】:

    • 谢谢,但没有成功,我正在尝试另一种方式来归档应用程序
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-02
    相关资源
    最近更新 更多