I have an old application. It worked at one time. Due to changes in the user environment, it is now possible to download applications from the AppStore. I built the app and sent it for review. And I received a report that my app crashed at startup. I tried to reproduce the fall for myself, but it didn't work out. In the crash log, I couldn't figure out what was wrong with the app. Please help me and tell me what I should look for in the log or in the application.
The crash location (which I found in the log):
_UIPathLazyImageAsset imageWithConfiguration
cl-1.crash
cl-1-n.crash
Post
Replies
Boosts
Views
Activity
Good afternoon, everyone! I made a typo and didn't add a dot before the overlay and got a crash while the application was running. There was no useful information in the crash stack to find the problem spot. But over time I realized that the mistake was that I forgot to add a dot. And here's the question: If the code falls without a dot and it seems to be initially incorrect, then why didn't the compiler report an error during assembly?
struct ContentView: View {
var body: some View {
Text("Text 1")
overlay(Text("Text 2"))
}
}
Good afternoon, everyone! I ran into this problem - when I try to exit the page in a separate window, the page freezes. Here is the code for the minimal implementation.
import SwiftUI
struct ContentView: View {
@State private var showPageNav: Bool = false
var body: some View {
NavigationView {
VStack {
Text("Show Page Start")
Button("Show Page Navigation") {
self.showPageNav = true
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .center)
.overlay(
NavigationLink(
destination: PageView(handleExit: { self.showPageNav = false }),
isActive: self.$showPageNav,
label: { EmptyView() }
)
)
}
.navigationViewStyle(.stack)
}
}
struct PageView: View {
let handleExit: () -> Void
@State private var showPageFull: Bool = false
var body: some View {
VStack {
Text("Show Page Navigation")
Button("Show Page FullScreenCover") {
self.showPageFull = true
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .center)
.fullScreenCover(isPresented: self.$showPageFull) {
Text("Show Page FullScreenCover")
Button("Exit Page Navigation") {
self.handleExit()
}
}
}
}
I tested on iOS 15 and iOS 16.