How to run SwiftUI Code in Playgrounds on iPad?

Tried to run the following code in Playgrounds as shown in this session:

Code Block Swift
import SwiftUI
import PlaygroundSupport
struct ProgressView: View {
    var body: some View {
        Text("Hello World")
    }
}
PlaygroundPage.current.setLiveView(ProgressView())


Instead of Showing a Preview the following error message is displayed:

There was a problem running this playground.
Check the code and try again



Answered by mhanlon99 in 641506022
What version of Swift Playgrounds are you using? What OS?

I'm running it in Playgrounds on the Mac with Catalina 10.15.7 and it runs okay for me...
Accepted Answer
What version of Swift Playgrounds are you using? What OS?

I'm running it in Playgrounds on the Mac with Catalina 10.15.7 and it runs okay for me...
Swift Playgrounds version 3.3.1 on iPad Pro (12,9 Zoll 3. Generation) with iOS 14.2...
I reset the iPad, which had beta software before, to the factory settings and now it works.
How to run SwiftUI Code in Playgrounds on iPad?
 
 
Q