Post not yet marked as solved
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.
Post not yet marked as solved
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.
Post not yet marked as solved
•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.
Post not yet marked as solved
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?
Post not yet marked as solved
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.
Post not yet marked as solved
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?