Well, I know the cause of the error, my question here is how to avoid this kind of error. In my case, what I want is, if the user enters a wrong id which means when the array return 0 results, is says for example :
NSLog (@"The id you entered is false !");
else, it proceeds the code normally without crashing.
Any ideas on how I can solve it ?