Re: UIDocument with NSFileWrapper

2016-03-22 Thread davelist
I don't claim this is the one right way, but I think it makes sense based on the little bit of documentation there is for NSFIleWrapper and it seems to work. My situation is complicated because my document consists of multiple files. UIDocument is pretty simple if you only need a single data fi

Re: UIDocument with NSFileWrapper

2016-03-21 Thread Luther Baker
Thanks for posting this. Exploring UIDocument and caching/parsing JSON instead of CoreData for a service based mobile app that must support offline mode ... and looking forward to considering where you landed. On Mon, Mar 21, 2016 at 5:11 PM wrote: > > > On Mar 21, 2016, at 2:08 AM, Quincey Morri

Re: UIDocument with NSFileWrapper

2016-03-21 Thread davelist
> On Mar 21, 2016, at 2:08 AM, Quincey Morris > wrote: > > On Mar 19, 2016, at 18:54 , davel...@mac.com wrote: >> >> What I’m having trouble understanding is how I store the images (whose >> filenames will vary from document to document) with NSFileWrapper. In my top >> level directory do I

Re: UIDocument with NSFileWrapper

2016-03-20 Thread Quincey Morris
On Mar 19, 2016, at 18:54 , davel...@mac.com wrote: > > What I’m having trouble understanding is how I store the images (whose > filenames will vary from document to document) with NSFileWrapper. In my top > level directory do I have my main model file as a JSON file along with a file > (JSON o

Re: UIDocument with NSFileWrapper

2016-03-19 Thread davelist
> On Mar 19, 2016, at 8:01 PM, Quincey Morris > wrote: > > On Mar 19, 2016, at 14:23 , davel...@mac.com wrote: >> >> My thought is to have a dictionary mapping each image filename to a >> NSFileWrapper > > You already have one, basically. The top level wrapper for a package is a > directory

Re: UIDocument with NSFileWrapper

2016-03-19 Thread Quincey Morris
On Mar 19, 2016, at 14:23 , davel...@mac.com wrote: > > My thought is to have a dictionary mapping each image filename to a > NSFileWrapper You already have one, basically. The top level wrapper for a package is a directory wrapper, which lists the wrappers of contained files, indexed by file

Re: UIDocument with NSFileWrapper

2016-03-19 Thread davelist
> On Mar 19, 2016, at 1:48 PM, Quincey Morris > wrote: > > On Mar 19, 2016, at 10:18 , davel...@mac.com wrote: >> >> The downside I see for my app is that UIDocument writes out the data to a >> temporary location and then moves it to the new location so I think my app >> will constantly be w

Re: UIDocument with NSFileWrapper

2016-03-19 Thread Quincey Morris
On Mar 19, 2016, at 10:18 , davel...@mac.com wrote: > > The downside I see for my app is that UIDocument writes out the data to a > temporary location and then moves it to the new location so I think my app > will constantly be writing out these image/PDF files that never change. Is > there a b