2017-10-05 147 views
1

我使用的Xcode 9和夫特4.表達式的類型在沒有更多上下文的情況下是不明確的。 <SocketEngine>類

我有被寫在夫特3和8的Xcode

我試圖在Xcode 9.運行此代碼的Xcode後一個項目轉換夫特3至夫特4,I橫跨以下錯誤傳來:

Type of expression is ambiguous without more context

Here is the link from where I was using the Swift file.

的錯誤是在下面的方法:

private func handleBase64(message: String) { 
    // binary in base64 string 
    let noPrefix = message[message.index(message.startIndex, offsetBy: 2)..<message.endIndex] 

    if let data = NSData(base64Encoded: noPrefix, options: .ignoreUnknownCharacters) { 
     client?.parseEngineBinaryData(data as Data) 
    } 
} 

回答

相關問題