What is the difference between NSBundle bundleWithURL URLforResource and NSBundle mainBundle PathforResource

171 Views Asked by At

I have the following code.

NSString *path = [[NSBundle mainBundle] pathForResource:@"play" ofType:@"mp3"];

The code above gets from mainBundle (Application Bundle) a file play.mp3 that is stored locally in my project

I have never used bundleWithURL and URLforResource could anyone explain to me what the code below does exactly? Any help appreciated.

NSBundle *bundle = [NSBundle bundleWithURL:[[NSBundle mainBundle]URLForResource:@"CloudResources" withExtension:@"bundle"]];
0

There are 0 best solutions below