如果没有更多的上下文,表达的类型是不明确的。 <socketengine>类

时间:2017-10-05 14:12:42

标签: ios xcode swift3 swift4

我正在使用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

2 个答案:

答案 0 :(得分:0)

不应该手动将库的功能更新到Swift 4。

再次下载图书馆it has now been updated to 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)
        }