<body>

iPhone Programming Tip: How to find the full URL of a file within your Application's Bundle

Monday, October 06, 2008

How to find the full URL of a file within your Application's Bundle (mainBundle)

This would return the full URL of a file named "Sound2.caf":

CFURLRef fileURL;
NSString *path;
path = [[NSBundle mainBundle] pathForResource:@"Sound2" ofType:@"caf"];
fileURL = (CFURLRef)[NSURL fileURLWithPath:path];

Labels:

Bookmark this post to del.icio.us Digg this post! Bookmark this post to Yahoo! My Web Bookmark this post to Furl

flickr