views:

1260

answers:

2

If I record an audio file and I have a core data object representing that recording... should I be referencing just the url to the recording on disk, or could I just store it within core data?

It's probably easier to just store it within core data, but doesn't sound like a very good idea.

+3  A: 

I would store the path to the file. This would be better because you can pass around the path until you actually need to play the file.

Dan Lorenc
+1  A: 

Writing down entities in Core Data is atomic if I remember. So if you are going to save down the data I'd go with a path. If the application is only going to be reading relatively small to medium blobs you would be fine with a one-to-one related entity I think.

Also with the limited memory in the iPhone keeping data as files will let you mmap them.

monowerker