Hi, I'm working on a project linking Swift UI project and UI Kit project.
I did put a UI button to move to swift view on View controller of UK Kit and UI Hosting Controller with root view defined as Swift UI View.
UIKit View Controller is HomeView Controller - attached code
SwiftUI main linked file is StartTabView and StartTabView uses other SwiftUI files (EventStore and EventListView)
When I run StartTabView and linked SwiftUI file in an individual SwiftUI project, it works perfectly well but when I copy swift UI files into UI kit project and reach same Swift UI files through the UI hosting controller, project builds successfully but in simulator when I push the UI button(Events) to start Swift UI view, program gives following error: "Fatal error: No ObservableObject of type EventStore found. A View.environmentObject(_:) for EventStore may be missing as an ancestor of this view."
I did attach error message screen copy as well.
Would anyone know what can be the possible reason?
I do appreciate your help.
P.S. I'm just beginning to learn Swift and XCode, so my syntax and structure of code is not good yet sorry if this causes you confusion.