Skip to main content
Participant
January 14, 2013
Question

Where to store data for iOS Development?

  • January 14, 2013
  • 8 replies
  • 2360 views

I'm building an app where I need to save a text file of JSON with user generated data.

I've been reading a few things on the Internet and it seems that the <Application_Home>/Documents directory is the best place to write the file without running into any problems with Apple. I've also seen things where I need use of a Native Extension. All in all, I'm a bit unsure since a lot of those articles are over a year old and Adobe has no documentation for this that I know of. So, can anyone clarify a best practice for saving text files?

This topic has been closed for replies.

8 replies

Inspiring
January 14, 2013

If you need this data at all times and it cannot be regenerated in some way, then you should store the data in the Application Support directory.  However, after the introduction of iCloud, Apple has been rejecting apps which use this directory.  This may just be a "shoot first and question later" approach, so you could work with your reviewer to get the app accepted using this directory without a native extension.

However, many developers are finding that they must mark the files in this location as DoNotBackup, per Apple's newest specifications.  This will mean that the files will not be sent to iCloud, and it will be your responsibility to maintain their content on a web server, etc. as needed.  This may not be necessary if your user does not expect for data to be held through an uninstall/reinstall process or something similar.

In order to meet Apple's requirements, a native extension is needed at this time.  More information can be found in this thread: http://forums.adobe.com/message/4463973

Inspiring
January 14, 2013

The ANE you link to works... for now. But be warned as it is not actively supported or maintained by the author (thanks for your iOS 6 update, ChristopherTotty!).

I too agree that Adobe needs to develop an official ANE (or adopt and maintaine the aforementioned item) for this critical iOS feature.

Inspiring
January 14, 2013

gtr, thanks for the tip, but if you'll remember from that thread, I made the changes to bring it up to current standard.

It is open source and everything you need to make it compatible with any new Apple requirements is there in the source or can be added.

Yes, Adobe needs to address this, but if you really need something, no one can do it better than yourself.