Lion Sandboxing an existing Snow Leopard Core Data App
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!
Solution
- Add a new Property List called "container-migration.plist" to your project.
- In the PList editor, add a property (row) called "Move" as type Array.
- Add a string to the array pointing to current app data folder. E.g. ${ApplicationSupport}/Your App Name