Posts

Post not yet marked as solved
18 Replies
Same. It appears that XCode doesn't recognize that the .swift file is part of the Landmarks project. So for instance if you try to make a variable of type Landmark, and then right-click and "Jump to Definition" XCode just flashes a question mark. Whereas in LandmarkRow.swift, the same task will actually open the Landmark.swift file that defines a Landmark. Frustrating - how can we add a SwiftUI file to our project so that XCode recognizes the new file is part of an existing project?UPDATE: playing around more, it isn't adding the file, but rather its that Preview / Canvas system doesn't recognize any new Views as being part of the Landmarks module. For instance, I add a new SwiftUI file, edit nothing, and click Resume in the Canvas. It should display hello world, but it gives the error:Compiling failed: no type named 'Test_Previews' in module 'Landmarks'Whereas previously this worked.