Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

precondition failure: invalid input index when using GeometryReader in SwiftUI starting with iOS 13.4

Yesterday I upgraded XCode and my project to iOS 13.4 and I started to see a lot of failures in around views that use GeometryReaders.

The error does not reveal anything besides "precondition failure: invalid input index"

like image 202
Andrei Matei Avatar asked Mar 26 '20 13:03

Andrei Matei


1 Answers

I had the exact same issue after upgrading to 13.4.1.

I installed a simulator with 13.3.3 and it didn't have the issue.

What ended up causing the issue was having a GeometryReader as an inner view of a NavigationView. Making the GeometryReader the top-most view fixed it for me.

like image 119
MarkosDarkin Avatar answered Oct 31 '22 23:10

MarkosDarkin