I'm using NSBundle resources to load some media:
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:someValue ofType@"someType"]];
if there is no resource found, the url value, of course, remains valid and using it would cause application crash, so the simple check
if(!url) { //or even (!mediaPlayer), or (url == nil)
//show alert box
}
does not help.