It seems a bit strange that we have to use such a long way to get to a file’s path:
NSURL *soundURL = [NSURL fileURLWithPath:[[NSBundle mainBundle]
pathForResource:@"0" ofType:@"aiff"]];
I wonder is there a faster way, such as a class method for NSURL or NSBundle?
NSURL *soundURL = [NSURL urlFromMainBundle:@"0.aiff"];
or
NSURL *soundURL = [NSBundle urlFromMainBundle:@"0.aiff"];
If not, is there a reason why it is not a good form?
How about:
Starting from there, you could also write a category for
NSURLorNSBundle: