我已经用 CocoaPods 安装了 Bond 6.2.6。在构建我的项目时,文件中出现了错误:
<my_proj>\Pods\Bond\Sources\Bond\Shared\NSObject+KVO.swift
错误:
.../NSObject+KVO.swift:239:81: Cannot convert value of type '(_, _) -> UnownedUnsafe<NSObject>' to expected argument type '(_, UnownedUnsafe<NSObject>) -> _'
源代码:
deallocationDisposable.otherDisposable = object._willDeallocate.reduce(nil, {$1}).observeNext { object in
if self.observing {
object?.unbox.removeObserver(self, forKeyPath: self.keyPath, context: &self.context)
}
}
评论它使我能够构建我的项目。但这可能不是最佳实践...