我正在使用Xcode 9和Swift 4。
我有一个用Swift 3和Xcode 8编写的项目。
我试图在Xcode 9中运行此代码。在Xcode将Swift 3转换为Swift 4之后,我遇到了以下错误:
如果没有更多的上下文,表达的类型是不明确的
Here is the link from where I was using the Swift file.
错误在以下方法中:
git add -i
答案 0 :(得分:0)
你不应该手动将库的功能更新到Swift 4。
答案 1 :(得分:0)
您应该更改:
if let data = Data(base64Encoded: noPrefix, options: .ignoreUnknownCharacters) {
client?.parseEngineBinaryData(data)
}
致:::::
if let data = Data(base64Encoded: **String(noPrefix)**, options: .ignoreUnknownCharacters) {
client?.parseEngineBinaryData(data)
}