Question

I have to submit an application to Mac App Store and got rejected from Apple by this reasons

Apps that do not comply with the Mac OS X File System documentation will be rejected

In guidelines suggest to write file the following directories

  • ~/Library/Application Support/{app-identifier}
  • ~/Library/{app-identifier}
  • ~/Library/Caches/{app-identifier}

but my files is temporary,cache files, then It can be write my file into NSTemporaryDirectory() and It will violate with guidelines ?

Était-ce utile?

La solution

NSTemporaryDirectory() is appropriate for temporary files.

~/Library/Application Support/{app-identifier}

This directory is for permanent files generated at run-time by your app.

~/Library/{app-identifier}

This directory is a catch all for most files created by your app. You have ownership of this directory.

~/Library/Caches/{app-identifier}

This directory is for temporary files which your app can recreate, but which it wants to keep on disk as long as possible. Files here may be deleted by the OS.

Autres conseils

I've written a simple library to return all these paths using the correct system functions, and with logic to automatically create them if they don't already exist (as is the case with ~/Application Support/AppName, etc).

https://github.com/nicklockwood/StandardPaths

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top