I have an app which I would like to be able to upload files to. I could imagine serializing the data, putting that into an array, then serializing the array and putting that
To sync core data between devices I would suggest you take a look at this site where I have posted details on Core Data and iCloud integration for both iOS and OS X apps. It is beyond the scope of an answer on this site.
http://ossh.com.au/design-and-technology/software-development/
Core Data allows you to set an option for external storage of attributes and IT will then decide whether to store the object in an external file.
So you would create an attribute called fileData (binary)
and in your subclass use NSData
and then simply set the file.fileData = yourFileData
and Core Data will decide where to store it.
No need to track the URL yourself. Don't forget to store some kind of identifier (file name) to allow you to retrieve the file you want.
EDIT
BTW if you just want to store an image of attributed string then it might be better to use a transformable attribute. Transformable is useful if you want automatic transformation to NSImage, UIImage or NSAttributedString (or some other archivable object).
set the file like this
NSData * data = [NSData dataWithContentsOfURL:...];
file.fileData = data;
To write the data to a file use
bool result = [file.fileData writeToURL:atomically:];
I believe you're not very much familiar with Core Data yet. I would strongly suggest to dive into Core Data documentation.
Anyway, from what I understand, possible implementation of your data model could look like this:
Your user would have an NSSet of File objects, each File object would be responsible for storing the name and its URL in Application Documents directory.
As for your second issue, I don't quite see a question there.
Hope this helps, Cheers!