0

I'm aware of answers to iPhone writing binary data, but that question was asked in 2009, and the iOS SDK has changed a bit since then.

I'm looking to serialize one or more NSCoding-compliant objects to disk, and read them back into memory at a later time (for submission to a sometimes-active web service). Is GCD's dispatch_read and dispatch_write the best option for this?

Community
  • 1
  • 1
cbowns
  • 6,295
  • 5
  • 47
  • 64
  • Do you have any specific requirements? For instance can you quantify several? Are we talking about 10 or 10M objects? Also, did you try an implementation already? Any issue with it? Premature optimizations is rarely a good thing :) Finally here's something relevant on the subject you might want to read: https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/TechniquesforReadingandWritingCustomFiles/TechniquesforReadingandWritingCustomFiles.html – Gabriele Petronella Nov 01 '13 at 22:14
  • I don't have any specific performance requirements, and several is < 10 right now, though each object may be holding up to a few hundred KB of binary data in one of its properties. I'm in the midst of a dispatch-based implementation but figured it was worth picking the community's brain for alternative approaches, especially since the previous Q&A is so old. – cbowns Nov 01 '13 at 22:15

0 Answers0