How to package an app with sqlite3 database
Check the Installer Log

Have you checked the Installer log file, /var/log/install.log, for errors or problems? Maybe the package is working but not installing where you expect.

A Better Approach

As Mark comments in your other question, try to avoid needing to install files in multiple locations.

Apple's developer tools for creating packages are:


pkgbuild
productbuild


Quick Fix using pkgbuild

Try the following approach for a quick fix. Note this installs to /Applications and not ~/Applications:


Prepare the files for packaging:

~/installer/
~/installer/Applications/
~/installer/Applications/YourApp.app
~/installer/Library/
~/installer/Library/Application Support/
~/installer/Library/Application Support/YourApp/
~/installer/Library/Application Support/YourApp/MyAppDB.sqlite3

Create the package with pkgbuild using a command like:

pkgbuild --root ~/installer/ --install-location / ~/Desktop/MyApp.pkg



Avoid this approach! Why?

This approach is not recommended because the install-location is root /. A robust installer will never install directly to root.

Problems include, what if the package's Applications, Library, or Application Support permissions differ from the user's permissions or ownership? What happens if the user has symlinked one or more of these files?

Instead a distribution package containing two standard packages should be used. One standard package will have an install-location of /Applications and the other with /Library/Application Support. This approach tells the installer tool to handle all the ownership, permissions, and symlink problems for you.

Ideal Approach

Ideally, a Mac application will be distributed as a self contained application bundle. If the MyAppDB.sqlite3 needs to be modified, a well behaved Mac application should copy a default database file from within the application bundle to the appropriate Application Support folder and use the copy as needed.

Be aware that if your application is sandboxed, the Application Support folder at /Library/Application Support/ will not be visible to the application. The application will be given its own, contained, support folder. This means that installing a database to /Library/Application Support/ will not behave as you expect.

If you can bundle everything in to the application, then a single call to productbuild will create a safe ready-to-distribute outside the Mac App Store installer package. Better yet, you could avoid an installer package entirely and distribute via a disk image or zip file.