I am able to record a .caf file in my app and play it back to the user. I want to be able save it permanently so I want to move it to my resources folder. I am not sure if this is the correct move or whether it would be better to put it in the documents directory but I access all my other sound files from resource so I assumed this would be the right choice. Does anyone know how to do this? Thanks!
How I save the recording to temp:
NSURL *soundFileURL=[NSURL fileURLWithPath:
[NSTemporaryDirectory()
stringByAppendingString:@"soundFile1.caf"]];
You cannot add, remove or modify files in your application bundle, which means you can’t add items to the resources directory.
If the file is something the user will want to keep in the app, it should be stored in the documents directory. You may want to prevent it being backed up to iCloud, which you can do by following Apple’s instructions here.
To get a path to the documents directory, or the path for a given filename in the documents directory, you can use methods like these: