Mac Getting the path

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.
 

Binju

macrumors member
Original poster
Jan 31, 2010
65
0
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:
 

robbieduncan

Moderator emeritus
Jul 24, 2002
24,638
61
Harrogate
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.