Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'NSInvalidArgumentException', reason: '-[UISearchBar searchTextField]: unrecognized selector sent to instance

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UISearchBar searchTextField]: unrecognized selector sent to instance 0x7f8ebaf60cf0'

How do I know which is this view 0x7f8ebaf60cf0?

I was doing PO 0x7f8ebaf60cf0

and it returns this 140250998770928

Then I needed more info like recursiveDescription but I can't get further. How can I start debugging such a bug?

like image 960
Marlhex Avatar asked Nov 13 '19 04:11

Marlhex


1 Answers

The problem is that searchTextField is iOS 13 only. On iOS 12 and before it compiles, runs, and crashes. Just do a global search for searchTextField and don’t use it under iOS 12 or earlier.

like image 64
matt Avatar answered Oct 18 '22 10:10

matt