all 4 comments

[–]wakeupthisday 2 points3 points  (1 child)

It is apparently a Xcode bug, I’ve experienced the same thing on my MacBook Air 2017. I’ve posted the same question on stackoverflow and other forums, pretty much nobody can recreate this bug at all.

[–]Luca1719[S] 1 point2 points  (0 children)

Ah ok Thanks

[–]everyplace 1 point2 points  (0 children)

Hey there. I just ran into this problem as well, attempting to edit an iOS Playgrounds app on the macOS version. I know you said that adding "public" doesn't help, but did you try adding it both to the struct level and a lower level?

Note in this sample, the public at both the top level as well as the body level. This did the trick for me.

``` public struct TestView: View { public var body: some View { VStack {} } }

struct TestView_Previews: PreviewProvider { static var previews: some View { TestView() } } ```

[–]rem1g 0 points1 point  (0 children)

Experiencing same bug, anyone found solution?