Question

I'm going through the effort of migrating an existing Snow Leopard app store application to a sandboxed Lion application. As part of the sandboxing, the Library path moved from ~/Library to ~/Library/Containers/appname/Data/Library.

The user defaults were automagically carried over from ~/Library/Preferences/app.plist to ~/Library/Containers/appname/Data/Library/Preferences/app.plist.

But my core data sqlite store was not. I've searched, but cannot find anything related to this migration.

Do I need to migrate the store manually or am I missing something here? If I do have to migrate it myself, I'm confused with how to access the old store file .. since it resides at ~/Library, which is no longer accessible after being sandboxed..

Any help is much appreciated!

Was it helpful?

Solution

  1. Add a new Property List called "container-migration.plist" to your project.
  2. In the PList editor, add a property (row) called "Move" as type Array.
  3. Add a string to the array pointing to current app data folder. E.g. ${ApplicationSupport}/Your App Name

More info here: http://developer.apple.com/library/mac/#documentation/Security/Conceptual/AppSandboxDesignGuide/MigratingALegacyApp/MigratingALegacyApp.html#//apple_ref/doc/uid/TP40011183-CH6-SW1

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top