Can someone spot my mistake?…
pred = [NSPredicate predicateWithFormat:@"ICAO contains[cd] %1$@ OR IATA contains[cd] %1$@ OR AirportName contains[cd] %1$@ OR CityName contains[cd] %1$@", searchText];
Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘Unable to parse the format string “ICAO contains[cd] %1$@ OR IATA contains[cd] %1$@ OR AirportName contains[cd] %1$@ OR CityName contains[cd] %1$@”‘
🙁
I’m not sure that the NSPredicate formats support the printf style number placeholders.
pred = [NSPredicate predicateWithFormat:@"ICAO contains[cd] %@ OR IATA contains[cd] %@ OR AirportName contains[cd] %@ OR CityName contains[cd] %@", searchText, searchText, searchText, searchText];