Issue In Xcode version 15.1 iOS Version 16.6
Very strange, the following code create a never ending loop if I miss a single dot(.) in the syntax. You can see the "onAppear" message in the log. Somehow the compiler also not showing any error or warning. With my limited knowledge , I feel it's a kind of a bizard in any programming language. Think about the possible regression issues in complex projects due to this. And we will not get any build issues also. Please correct me if I am doing something wrong here. There are other similar issues like this, but I think I am able to reproduce this by removing a dot "."
Code with issue
.onAppear() {
subscribeListeners()
Logger.shared.debug("DownloadDataView: onAppear")
}
onDisappear() {
unsubscribeListeners()
}
Correct code
.onAppear() {
subscribeListeners()
Logger.shared.debug("DownloadDataView: onAppear")
}
.onDisappear() {
unsubscribeListeners()
}
Xcode version 15.1 iOS Version 16.6