This code runs fine on MBP in Xcode. But in iOS Swift Playgrounds it fails on line 9 with:
There was a problem encountered while running this playground. Check your code for mistakes
on iPad from a start up Blank 5.3 playground.
I have whittled this code down a lot from the Stanford SwiftUI 2020 course posted on YouTube. The whole EmojiArt app worked flawlessly as of lecture 7 in iOS Swift Playgrounds for iPad in version 3.2 a few days ago before the upgrade to version 3.4.
Now, this, as well as many other apps have all broken after the iOS Swift Playgrounds app updated to version 3.4.
There was a problem encountered while running this playground. Check your code for mistakes
on iPad from a start up Blank 5.3 playground.
Code Block swift import PlaygroundSupport import SwiftUI struct ContentView: View { var emojis = "🐿 🐝🦋🐌🐞🐜🐛🦒🐘🦛🦓🦏🐪" var body: some View { VStack { ScrollView(.horizontal) { HStack { ForEach( emojis.map { String($0) }, id: \.self ) { emoji in Text(emoji).font(Font.system(size: 45)) } } .padding(.horizontal) } Color.yellow .edgesIgnoringSafeArea([.horizontal, .bottom]) } .background(Color.white) } } PlaygroundPage.current.setLiveView( ContentView() )
I have whittled this code down a lot from the Stanford SwiftUI 2020 course posted on YouTube. The whole EmojiArt app worked flawlessly as of lecture 7 in iOS Swift Playgrounds for iPad in version 3.2 a few days ago before the upgrade to version 3.4.
Now, this, as well as many other apps have all broken after the iOS Swift Playgrounds app updated to version 3.4.