What is sandbox

sandbox logo

As Apple says:
"App Sandbox provides a last line of defense against stolen, corrupted, or deleted user data if malicious code exploits your app. App Sandbox also minimizes the damage from coding errors in your app or in frameworks you link against."

And again from this article (MacWorld)
"Sandboxing refers to compartmentalizing what data and features a specific app is granted access to; apps each can metaphorically play exclusively in their own sandbox, accessing only that data which Apple has granted that app entitlements to see."

Sandbox in FitPlot

Important: Sandbox has been introduced (mandatory) starting with FitPlot 4.2 and is active only under Mac OS X 10.7 (or more).
Starting with FitPlot 4.5 (and MacOS 10.7.3 or more) we have very much improved the sandbox integration that is now almost invisible to the final user.
If you are still using FitPlot 4.2, please take a look at the tips here below:

Sandbox in FitPlot 4.2 / MacOS 10.7
  • Since FitPlot documents does not incorporates image / PDF files they have inserted into, but just a "link" to the files, it is required by the sandbox to consent their use / access, once for session, popping up the Open dialog (this has to be done for every file! See why and some tip to avoid this). So, opening a saved FitPlot document with many different images inserted, may be tedious, but so it is, at least for now.
  • Also when saving a document with temporary[1] images inserted, it is required to save each temporary image to disk, before to save the file itself (in non sandbox environment this was done in batch, requiring to the user a prefix and a place where to save all temporary images).
  • The other important change is that in sandbox environment the folders FitPlot is referring to for its data warehouse and preferences, has moved from:
    ~/Library/Application Support/com.pamarcu.fitplot
    to the new sandbox container:
    ~/Library/Containers/com.pamarcu.fitplot/Data/Library/Application Support/com.pamarcu.fitplot
    This is an underhood change and it should be performed transparently to the user. All templates and log files should be transferred to their new location at FitPlot 4.2 (on 10.7 or more) first launch.
[1] Temporary images are created on the fly and saved temporarily in a special folder in the sandboxed area of the app. When exiting the program (or saving the file that contains temporary images) that special folder has to be cleaned and temporary images has to be saved elsewhere. Temporary images are created by dropping from a web browser, pasting with a copy taken from another application, snapshotting…

Disclaimer & future improvements

I am aware of the inconvenience that the sandbox adoption may arise.
In the next releases I will include some remedy to the opening / saving problem. There are some new APIs in the 10.7 development kit that I have not included now just not to abandon 10.6 users.
Next time, FitPlot will go 10.7 as minimum requirements; in the meantime, I hope Apple will release some less restricting entitlements, to get users life better.

In the meantime…

The sandbox, that is the place where FitPlot can play in safety, is in:
Here you can save your files and move your linked images. In this way no special permit is required via the Open dialog.
The only problem is that this folder is in the ~Library folder that is invisible by default (what a contraddiction!).
To gain access to this folder, use the Finder command "go to folder…" (cmd-shift-G) and type (or paste) the following line
Once you have the folder opened, hold down Option (Alt) then click and drag the folder icon from the title bar of the Finder window straight to the sidebar, and put it wherever you want in your Favourites list. In this way you have that folder available in all Open / Save dialogs.