Notice

The forum is in read only mode.

  • Page:
  • 1

TOPIC: Deploying SQLite data file to Mac OS X

Deploying SQLite data file to Mac OS X 7 years 10 months ago #2116

I am developing a Mac OS X application that uses a SQLite data file. I added the data file to the deployment manager and the file is being included in the package. However, when I deploy the package and run the app, the software creates an empty SQLite data file in the container's data folder (if SQLite cannot find the data file it creates one). When I show the contents of my package, I can see the data file.

How do I get the data file out of the package and into the Container's data folder? I manually copied the file and pasted it into the container folder and the app could then see the file - but I cannot ask my user's do this.

I am new to using the Mac package and working in the Mac Sandbox.

Glenn House

Deploying SQLite data file to Mac OS X 7 years 9 months ago #2282

Glenn,
I assume you are using RAD Studio XE8 or an equivalent Delphi/C++/Appmethod version to build and deploy your Mac OS X application to the Apple Store.

The Container location can be specified in your Project Deployment file list; mark your database file to go to Contents\Resources\StartUp. The RTL code will automatically copy your database file from the package (at application startup once) to the newly created Container location for your application.

Further details at docwiki.embarcadero.com/RADStudio/XE8/en...Mac_OS_X_Application

The same applies to any InterBase database files should you choose InterBase over SQLite; docwiki.embarcadero.com/RADStudio/XE8/en...se_ToGo_for_Mac_OS_X

Best wishes,
Sriram
The following user(s) said Thank You: Glenn

Deploying SQLite data file to Mac OS X 7 years 4 months ago #3933

Sriram, I understand how to deploy the files to the sandbox, but how do I access files in the sandbox. For example, if I deploy a SQLite data file to the sandbox container, how do I later connect to the file. If a file is located in the Downloads folder, I can TPath.GetDownloadsPath to find the Downloads folder on a user's computer. Is there something similar for finding the sandbox container path? Thanks, Glenn House
  • Page:
  • 1
Moderators: April Anne