Access @Environment object from UIViewControllerRepresentable object
问题 I used this approach to incorporate camera with swiftUI: https://medium.com/@gaspard.rosay/create-a-camera-app-with-swiftui-60876fcb9118 The UIViewControllerRepresentable is implemented by PageFourView class. PageFourView is one of the TabView of the parental View. I have an @EnvironmentObject passed from the SceneDelegate to the parent view and then to PageFourView. But when I am trying to acess @EnvironmentObject from makeUIViewController method of PageFourView I get an error: Fatal error: