This morning I wanted to continue working on my project, but XCode suddenly showed me a lot of errors. They were absolutely silly errors, like Image doesn't have .resizable modifier e.t.c.
Then I started a new project to make sure my project is OK, and yes, XCode was full of errors even in its starting project. I attached the screenshot of the phenomenon.
What I tried so far:
Clean build folder
Quit and restart XCode
I used DevCleaner
Restart machine
Uninstall and reinstall XCode
to no avail.
Do you have any ides? Thanks.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
I have a list of rows of articles in a SwiftUI List. The code is the following:
struct ArticleListView: View {
var articles: [Article]
var body: some View {
List {
ForEach(articles) { a in
ArticleRow(article: a)
}
}
}
}
When I run it in the simulator it works like a charm but the Preview Canvas always returns with an error.
The Article struct conforms to Identifiable so this is not really the problem.
I have tried to play a little with the view. When I replaced the ForEach with the following:
List {
ForEach(1..<5) { i in
ArticleRow(article: articles[i])
}
}
the preview displayed the list beautifully.
But when I replaced the ForEach with the indices, like this:
List {
ForEach(articles.indices, id:\.self) { i in
ArticleRow(article: articles[i])
}
}
the Preview canvas was not able to display the view.
The error message is the same for all scenarios:
MessageSendFailure: Message send failure for update
==================================
| MessageError: Connection interrupted
Does anybody have any idea how to solve this, or is this maybe a bug in the current (13.2 and 13.2.1) Xcode version?
Thank you.