There is also a View declaration in SQLite,
public struct View: SchemaType
importing SwiftUI and SQLite in the same file will cause naming conflicts, and the compiler cannot identify which View you are using.
You have to specify the module from which to lookup object type. Call SwiftUI.View@SwiftUI.BindingSQLite.View
Or You can refactor ContentView.swift to put the DB related operations in an extra file such as DB.swift, so you don't have to import SQLite in ContentView.swift
thankyou! Thats very kind. And amazing.. I'm actually mid-refactoring so I think I can do this. I'll be in touch for any more support which is possible
There is also a View declaration in SQLite,
public struct View: SchemaType
importing SwiftUI and SQLite in the same file will cause naming conflicts, and the compiler cannot identify which View you are using.You have to specify the module from which to lookup object type. Call
SwiftUI.View
@SwiftUI.Binding
SQLite.View
Or You can refactor
ContentView.swift
to put the DB related operations in an extra file such asDB.swift
, so you don't have toimport SQLite
inContentView.swift