Thankyou for your post. I'm also using iOS in xcode 11.3.1 and the same crash message appears when the "<Back" Button is used with the ScrollView, which is also the second tabItem in this case. There is a noticeable delay after the "<Back" Button is used and the crash occures. If I go back to the first non-ScrollView and then use the "<Back" Button there is NO crash. I've tried looking for why there is a difference between the two tabItems without success. I'm going to wait until the next Xcode upgrade before spending anymore time on this issue. Is there anyone else that has the same crash conditions? Yes, could this be a swiftui bug?
Post
Replies
Boosts
Views
Activity
I'm having the same problem with two Buttons inside an HStack. This condition was noticed after the update to macOS Catalina, Version 10.15.4. Did not notice this problem before the update. I did try the ".buttonStyle(DefaultButtonStyle()" solution given in a Post below, but it did not solve my problem.
After a little more investigation it looks like a .onTapGesture Instance Method might be a better practice than Button Generic Structure.import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
HStack {
Text("Left Button")
.onTapGesture {
print("Left Button Tapped")
}
Spacer()
Text("Right Button")
.onTapGesture {
print("Right Button Tapped")
}
}
}
}
}For a few different reasons this looks like it could be more reliable than using Buttons?
•Initial Conditions
••Xcode Version 12.2
••Deployment Info
•••iOS 13.4
••••iPhone
••••iPad
•••macOS 10.15.4
••••Mac enabled
••Two AppIcon Files w/ all image sizes
•••Devices iPhone and iPad
•••Device Mac
••Scheme Device
•••iPhone 8 Simulator
•Information given at end of the Issue Log
••Command CompileAssetCatalog failed with a nonzero exit code
••…/assetcataloggeneratedinfo.plist
••Instead of going to the info.plist file
•••Went to the Project TARGETS > General Tab > App Icons and Launch Image
••The App Icons Source Drop-Down-List was empty
•••1st selected the macOS AppIcons - The Issue did not change
•••2nd selected the iOS AppIcons - The Build Succeeded
••Then changed the Scheme Device to My Mac - The Build Succeeded
•Conclusion: The App Icons Source must be the iOS AppIcons file name
This is a simple Reply, hope it saves other people some of their valuable time.
I also have the "Could not read serialized diagnostics file: error("Invalid diagnostics signature")" warning. I've tried a few improvements with restarting Project after deleting it's "xcuserdata". Thank you for posting this Question, hope it gets resolved as soon as possible. I WILL be back frequently on the status of the Question. It's on my Calendar. How many other Developers have the same situation?
This is in addition to my comment two days age. After doing a little more troubleshooting I found this information.
Hope this helps to isolate the root cause.
Today the condition is April 12, 2022, macOS 12.3.1, Xcode 13.3.1 just installed and Swift 5.6.1. Is there a work around for this?
I have been working on this for a few days, why is this problem NOT fixed by now? My "User Experience" is not very good, for whoever cares.
Can SwiftUI AsyncImage use Images saved as a File on an iCloudDrive?
This happened again weeks later. Using Menu > Source Control > Discard All Changes… and the Build is Successful again. If you are having the same problem, please leave a Comment
On 9/13/22 updated to Xcode 14.0, but iOS 16.0 is not available. Now: "This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your Mac and device in order to correctly detect compatibility". Am I missing something here? Do we need to wait for iOS 16.0 to develop for iOS 15.7, which is the current highest iOS device version?
I'm using Xcode 14.0, have we gone back to Xcode 1.0? Why, is this time saving feature missing in action? Which Apple Team came up with this dark idea? Is there something broken here? Removing this feature makes troubleshooting a Core Data Model a lot more time consuming and less reliable! Over the last 4 months there has been NO reply from Apple, is there anyone from Apple listening to so many developers on this issue? What a BAD practice!
Receiving the same warning with:
import SwiftData
@MainActor class…: ObservableObject {
@Environment(\.modelContext) private var modelContext
init() {
let descriptor = FetchDescriptor<Location>(predicate: #Predicate {$0.areaName != ""})
let count = (try? modelContext.fetchCount(descriptor)) ?? 0 <<== Warning here
}}
Then the App Crashes
Not interested in a View with a List
Just a [fetchCount]
Current iPad (7th generation) used a month ago, has iPadOS Version 17.1.1. The condition originally described not longer exists. The right pane detail view is updating when the left pane has a new selection. Thank you for your follow up.
Thanks for the Workaround.
Count me in with Xcode Version 16.0. Could not find another article on this subject. What is the Best Practice to help get this fixed with Apple Computer.
Deleted all Projects from the DerivedData folder
Cleaned the Build Folder
Quit Xcode
re-Opened Xcode
Performed a Run
Got the "Unable to Install" Message again
Issued a report to Apple
Closed the Project
Created a new Project
Performed a Run
The Message appeared again for the new Project?