Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Binju

macrumors member
Original poster
Jan 31, 2010
65
0
I have a Resorces -> Media -> Player.playlist .

Code:
NSBundle *thisBundle = [NSBundle bundleForClass:[self class]];
	 NSString *filePath = [thisBundle  pathForResource:@"Video1" ofType:@"mov" inDirectory:@"Media/Player.playlist"];
													
	NSLog(@"File Path=%@",filePath);


File Path always display nil.
 
Does it work when you use [NSBundle mainBundle] ?


It works when i use te below code,


Code:
 NSString *movieName = [NSString stringWithFormat:@"video%d", i];	 movieFile = [thisBundle pathForResource:movieName ofType:@"mov" ];

The problem arise when i use inDirectortory:
 
Can you post the path, relative to your .app, that you are trying to load the movie from? That way we can, perhaps, help you work out the usage required.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.