I had the same problem in Xcode Swift Playgrounds (v. 15.3). I was using UIKit/PlaygroundSupport and setting a UIViewController subclass to the liveView. That UIViewController subclass was defined in the main file (not in the Sources folder). When I made that UIViewController subclass public was when I got this error and the playground would run but the live view wouldn't show. When I removed the "public" accessor, that error disappeared and the live view started showing again. I know that this isn't the same type of project as the OP's, but I figured there might be something related.