In simplicity a document package is a folder with an extension. You then add a file type to your application like the screenshot below. Make sure your “Conforms To” is correct. It can also take a couple of times for the OS to realize this and take effect.

What you then must do is change your mentality so that you think of this folder as your data file. When you save, you create a folder and in that folder you store the SQLiteDatabase. When a user selects a file, they’re actually selecting the folder. Your application then goes into the folder to read the db.
The next step is to utilize at least one trick described in my huge guide on Sandboxing for a xDev issue 13.2. That is to use the Apple Recent Items menu. Anything that’s stored in the Apple Recent Items menu, has access retained. I personally use my own Sandbox Kit.
Once your application is set-up to use your document packages; simply add OWRecentItems.addToRecentMenu( docPackageFile )
when a document is opened or saved and it will be added to the menu. Make sure that this is either the file dragged into the application or selected via the Open/Save dialog.
DO NOT USE SECURITY-SCOPED BODGEMARKS. You MUST request and release access to the files that these connect to, when using a SSB. If you do not correctly perform this operation it’s possible to leak kernel memory and crash a machine. SSBs are also incompatible with many of Apple’s API due to the Lazy loading.
The other technique, which also requires redesigning your application, is to use Apple’s “Resume” functionality. In principle this is easy, add a NSURL or NSDocument to a Window. However the application must be shut down in a very specific way and it relies on the user having it enabled in the OS.
And finally, Apple have added provision for databases to access their journal file without any modification, or so Apple say. My understanding is it only works for apps that are written in Apple’s tools and uses Apple’s own database API.
Yes; the App Sandbox is a nightmare for a lot of developers; it’s also the reason as to why the App Store is devoid of many professional applications. While I would recommend you still target the App Store, it’s not what it used to be and so don’t feel bad if Apple’s decisions don’t allow for your application to be there. The App Store used to account for 80% of our income, in the first 6 months of this year, it only accounted for 34% (the money coming in from the App Store has dropped).