Closed fpcornelis closed 9 months ago
You'll need to provide more details on the crash, stack trace, etc. I have previously used a similar setup without issue.
Ideally a sample project demonstrating the issue, otherwise it could take me a long time to investigate sorry.
Stacktrace
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x105b1ee3c bool objc::DenseMapBase<objc::DenseMap<DisguisedPtr
Interesting, I think this indicates an underlying issue (similar to #62) because they have almost identical configurations for the delegate-dance in order to prevent introducing issues into native SwiftUI code, as well as allow multiple modifiers to co-exist.
@roland-schmitz-ocu worth you taking a look at this as well, I think its related and perhaps even proves my points I made on the other issue.
I'm fairly confident this all worked previously, so I wonder if something was introduced since iOS 16 that just wasn't uncovered until now since a lot of users of this library are here for "backports" therefore not iOS the latest iOS versions.
Thanks @shaps80 for the pointer to this issue. I could reproduce it on iOS 15, 16 and 17 and yes you are right, the issue is very similar to #62. Also here the delegate dance happened multiple times which created a cycle in the delegate chain. I could fix it in the same way as in the other two cases by not touching the delegate when it has already been setup. I added a third commit to my PR #63 which 100% fixes also this issue on iOS 15, iOS 16 and iOS 17.
I believe it solves the crash, but focusstate doesnt work properly, doesnt focus in the correct field.
In the example above, when screen appears focus on password and it's not correct.
Thanks @shaps80 for the pointer to this issue. I could reproduce it on iOS 15, 16 and 17 and yes you are right, the issue is very similar to #62. Also here the delegate dance happened multiple times which created a cycle in the delegate chain. I could fix it in the same way as in the other two cases by not touching the delegate when it has already been setup. I added a third commit to my PR #63 which 100% fixes also this issue on iOS 15, iOS 16 and iOS 17.
Perfect, I merged already :)
If you use focus state with two Textfields, app crashes.
If you replace VStack with Form/List it works, but I dont want use a Form.