flmcl
(francis)
1
Can anyone tell me why I would get a system crash with this bit of code:
import SwiftUI
struct ContentView: View {
let strings: [String] = (1...10).map {"Item ($0) " + String(repeating: "x", count: Int.random(in: 0...10))}
var body: some View {
HStack {
ForEach(strings, id: \.self) {
Text($0)
.padding(10)
.background(Color.gray)
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
This is the crash details:
Could not launch Simulator.app.
Domain: DTiPhoneSimulatorErrorDomain
Code: 4
The operation couldn’t be completed. (OSStatus error -10827.)
Domain: NSOSStatusErrorDomain
Code: -10827
System Information
macOS Version 10.15.4 (Build 19E287)
Xcode 11.4 (16134)
flmcl
(francis)
2
Solved I just got the latest version of xcode and makes the difference. Thank you