I had the following error message:
Fatal error: unexpectedly found nil while unwrapping an Optional value
In the following code snippet:
// Lê uma coluna do tipo String no (BANCO DE DADOS)
func getString(stmt:COpaquePointer, index:CInt) -> String {
let cString = SQLiteObjc.getText(stmt, idx: index)
let s = String(cString)
return s
}
Why does this occur?