简体   繁体   中英

trying to remove audio file from project

I can't seem to get rid of an audio file in my iOS project. I had it in my Supporting Files folder but deleted it (moved it to the Trash, not just its reference).

It is still being picked up by this line of code in my DetailViewController:

NSArray* soundFilesArray = [[NSBundle mainBundle] pathsForResourcesOfType:@"wav" inDirectory:nil];

I'm sure it's something simple, but I'm still rather new to this so am confused as to how XCode is finding the file. After looking everywhere in the XCode project, I even scoured all folders (in a Terminal) and couldn't find anything. I also did a Clean (Product > Clean).

File is cached in your .app file. For clean this, do this steps:

1) Open Organizer

2) Click Projects

3) Find your project at left panel and click

4) CLick on Delete at center panel

5) (Optionally) If you want a see in Finder, click on Arrow who after a "Derived Data" path

6) Build your project. And XCode will copy your resources at again.

Even though you've removed the file from your project, it has already been copied to the device you were building to (either the Simulator, or the iPhone or iPad you were testing on). Delete the app from the device, and all files will be removed from it. Then, since you have already cleaned the XCode project to ensure the file is really gone, if you rebuild to your test device, the file should be gone for good.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM