Daniel G. Wilson
Daniel G. Wilson

Reputation: 15055

Cocoa Touch - Resources Question

Hey all, I have a selector that searches the mainBundle for all .aif files, and allows the user to select them. This works fine, but then I removed some of the files from the project and folder, yet they did not disappear. Is there any way to maybe recompile it or something because It's now plagued with sound files that I don't need.

Thanks!

- (void)loadPossibleSounds {
    NSBundle *soundBundle = [NSBundle mainBundle];
    possDrumSounds = [soundBundle pathsForResourcesOfType:@"aif" inDirectory:nil];
    NSLog(@"PossDrumSounds: %@", possDrumSounds);
    [possDrumSounds retain];
}

The above is the code that I use to get an array (possDrumSounds) full of all .aif file paths. Looking at it again, it may have to do with the fact that I said inDirectory:nil, but that shouldn't matter.

Upvotes: 0

Views: 109

Answers (2)

Daniel G. Wilson
Daniel G. Wilson

Reputation: 15055

Interestingly, this has been resolved. It appears that for some reason xcode and the iphone simulator retain all of the resources in the bundle. (At least in my case). This was remedied when I tested it on the device which did not have all of the extra sounds.

Upvotes: 0

Joshua Nozzi
Joshua Nozzi

Reputation: 61228

Try cleaning your target and re-building.

Upvotes: 1

Related Questions