iOS 13.4 Crashes app with vague message: precondition failure: type check failed: 101, expected Text, got _HiddenModifier

隐身守侯 提交于 2021-02-10 07:27:31

问题


Sorry to be vague in the description here, but this has caused my app to be completely DOA when a user attempts to use my search feature. This did not happen before iOS 13.4 and the error message is not helpful at all. Cant find any info. Has anyone run into this? where could it be?

The app crashes at the point where in my SwiftUI file, I populate the view using a ForEach from an array, which is an observable object:

ForEach(self.listArray.searchDataArray, id: \.self) { fetchedData in

Ill update if I figure it out, wanted to see who else has experienced this and what possible causes could be.

Thank you!


回答1:


Found the issue:

This line of code, which i added to avoid screen glitches in swiftUI caused it:

Text("").hidden()

commented it out and it all works fine..

weird!



来源:https://stackoverflow.com/questions/60920651/ios-13-4-crashes-app-with-vague-message-precondition-failure-type-check-failed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!