Search code examples
iosipadosios17

iOS 17 Beta crash: -[NSCountableTextLocation compare:] receiving unmatching type (null)


Unable to find the cause... but the stacktrace is this!

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCountableTextLocation compare:] receiving unmatching type (null)'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000012083f88a __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x0000000117674894 objc_exception_throw + 48
    2   CoreFoundation                      0x000000012083f768 -[NSException initWithCoder:] + 0
    3   UIFoundation                        0x000000014ee60aa5 -[NSCountableTextLocation compare:] + 200

Solution

  • To solve the problem I removed all the constraints on the UITextField and added them again. This is the only thing I did.