Closed digitxo closed 3 years ago
Both SwiftUI and SQLite have a View
type, so the compiler is confused about which one to use. You either need to not import SQLite and SwiftUI in the same file, or be explicit and put SwiftUI.View
anywhere it’s supposed to be a View from SwiftUI. I would personally recommend not putting your SQLite code in the same file as your SwiftUI code.
My workaround is to put the SQLite related codes to a new separated swift file, then invoke func
directly in your main SwiftUI file.
When I import SQLite to my SwiftUI controller I get this msg: