bettar / miele-lxiv

DICOM Viewer 64-bit fully open source
https://itunes.apple.com/us/app/miele-lxiv/id988332475
GNU General Public License v3.0
112 stars 29 forks source link

File structure and contents of the app on disk #99

Closed howardm closed 11 months ago

howardm commented 12 months ago

Hi,

I installed the app yesterday.

I have questions -- related to the screenshot below:

Why is there a discrepancy between the stated Default Location of the Database in the app preferences and its (convoluted) location shown in Finder ?

(There is no ".../Library/Containers/com.bettarini.miele-lxiv")

Why are there so may aliases to folders within, such as AddressBook and iCloud (and others in other Folders)?

Screen Shot 2023-10-07 at 1 17 03 PM

Sincerely,

Howard

bettar commented 12 months ago

The application installed from the Apple App Store is "sandboxed" as required. As a results all the "standard" directory locations end up having some convoluted prefix by default.

You say that there is no such location. I have a feeling that Finder is lying to you, even if you enabled showing hidden files. Maybe this is part of the sandboxing (which I hate). If you check from Terminal you might find that the directory is there.

You can choose the alternative option of "browsing" to any directory of your choice and end up with a more sane looking path. The sandboxing doesn't allow to do that programmatically a priori, and the directory must be selected intentionally by the user the first time. Then internally the selected path must is saved by the app with a special API that in practice bypasses the sandboxing (did I already say that I hate all this ?)

howardm commented 11 months ago

True.

Screen Shot 2023-10-08 at 1 20 59 PM

This is very confusing.

I don't understand Sandboxing.

I still don't like it when an app has folders with links to my AddressBook, iCloud, etc.

Any comments ?

Thanks.

Howard

bettar commented 11 months ago

I have absolutely no idea how that AddressBook and iCloud stuff got there, certainly not from the miele-lxiv app. Are they files or directories ? What's their content ?

bettar commented 11 months ago

Try to temporarily rename you directory /Users/howardm/Library/Containers/com.bettarini.miele-lxiv/ or if you don't need a backup even delete it, then relaunch the app and see if those strange AddressBook and iCloud files get created again...

Alternatively only try to delete only AddressBook and iCloud and see if they are recreated...

As a last resort, set the location of your Database manually to ~/Documents like it used to be for the non-sandboxed version of the app.

bettar commented 11 months ago

Upon further investigation I confirmed that AddressBook SyncServices iCloud are there also for other apps that I checked. That confirms to me that it's not miele-lxiv explicitely using them, maybe it's something that all sandboxed apps have.

They seem to be symbolic links, for example: AddressBook -> ../../../../../Application Support/AddressBook

I agree with you, it puzzles me why they are there. Can anybody else further comment on this ?

howardm commented 11 months ago

Hi,

Yes, they are symbolic links to the targeted folders.

Maybe this helps a bit:

https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/EnablingAppSandbox.html

Such as, Enabling Personal Information Access.

And: https://www.appcoda.com/mac-app-sandbox/

Howard

bettar commented 11 months ago

The project settings for the app have the option for access to the address book is disabled already, and yet the symbolic link to AddressBook gets created. That's not what I would expect. Screenshot 2023-10-10 at 13 14 15

howardm commented 11 months ago

O.K.

This issue seems to be primarily about, in large part, inexplicable convolutions associated with a sandboxed app.

I guess...