how to detect files related to an app on a mac - macos

I am wondering how an application like appzapper can detect the files related to an application?
All ideas are welcome.
Thanks for your help,
Regards,

By looking into the standard locations that usually are used by applications to store preferences (like Library/Preferences/ , Library/Caches, etc., both in your home directory ~/ and under / ) I couldn´t find any file or folder that isn´t using either the applications name (eg. ~/Library/Application Support/Firefox) or it´s bundle identifier (eg. ~/Library/Preferences/org.mozilla.firefox.plist) in its name; so I guess they´re just using that.
In the case of AppZapper you can go ahead and try for any (not currently running) Application to rename the ~/Library/Application Support/AppName folder for example to ~/Library/Application Support/111AppName - AppZapper doesn´t find it anymore. If you change it to ~/Library/Application Support/AppName111 it shows up as a related file.
Out of this you can conclude that there isn´t any magical linkage between a folder full of preferences and it´s associated application that AppZapper is reading out, it´s merely checking for folders starting with the Application´s Name.

Related

Mac OSX: How to associate a directory as bundle

I am writing an app for Maverick.
The app creates a folder under /user/document, named "folder.db".
All the user related files will be in a folder "folder.db".
I would like to associate my app with "folder.db" directly, so that clicking on it would open my app and not the Finder.
How to achieve that?
Note: I tried to play with the UTI settings in xcode but not luck...
First .db is generally used for databases. So probably not a good idea. What you are looking for is a package or bundle in Cocoa terms. In Cocoa you want to look for the fileWrapper methods. Those create package/bundle files that are folders with a special flag bit set to make it act like an opaque file in Finder
You might want to study NSWorkSpace, NSFileManager, NSBundle, NSDocument and NSOpenPanel and NSSavePanel.
Those will get you on the path.

Mac terminal Chrome Apps.localized

For some strange reason the Applications folder for a user login has changed itself.
It seems to have created an Alias for the real Applications folder and then stuck in Chrome Apps.locaslized in the original folder of applications.
This means I can no longer access my applications via the terminal. This is inconvient as I edit the Vhosts file of MAMP this way.
Can anyone shed some light as to how this might have happened and how I can revert it back so that Applications are put back into the applications folder as they should be
I have added an image so u can see what I mean
Type in:
cd /Applications
It will take you back to your list of all apps. I don't have an explanation but after playing around with the same issue I got back to my apps folder like that.
I'm having this same problem and this is the only other instance of it I found on google. Has anyone else encountered this or found a fix? After installing MAMP my Applications folder is now at /Applications instead of /Users/[username]/Applications
/Users/[username]/Applications now only contains Chrome Apps.localized

Xcode - Can't see files in Documents directory using File Sharing

can somebody please help! I'm creating audio files using Xcode and placing those files in the 'documents' directory of my app, the point being that I can retreive them using iTunes and File Sharing.
I save the audio files as type .caf, I've created a directory list to make sure that all my files are actually there, they are. I NSLog the directory that the files are being stored to, it's the application documents folder. I have 'UIFileSharingEnabled/Application Supports iTunes Sharing' as TRUE in the info.plist. Everything seems to be working fine, EXCEPT... I just can't see the files in iTunes File Sharing. I KNOW they're there... I can even email them successfully from the same directory, but they don't show in iTunes.
Please can somebody help!
Thanks a lot!!!!
What you're saying doesn't really makes sense.
If you've done all the things you've mentioned properly, you should have had access to the application directory through iTunes.
Nevertheless, considering some problem still happens, you can do the following:
If you have SSH access to your phone (for jailbreak iPhone), you can use SSH to list the files on the documents directory.
If you don't have SSH, you have to solve the problem internally - through your application.
I recommend: List iPhone application document files

Where is user specified data being stored on MacOS

I install an app .app file to /Applications folder.
Can you please tell me where does the user specified data being stored? How can I do to clean uninstall my application and its user specific data?
Thank you.
This depends on the application, unfortunately. Sometimes it is in ~/Library/ folder, though.
AppTrap should do the trick.
It runs in the background and simply has a preference pane in the System Preferences. Drop the application onto the trash folder and it will ask you whether you want the associated application files to be deleted too.
Just let the user do that. For instance with AppCleaner.
Otherwise, just give a way in your preferences to reset them. No need to delete the plist file.
AppDelete is a free program for uninstalling and cleaning up.
FSEventer is a free program for seeing where programs install themselves.
Most information is stored within /Library/, however from time to time you may find applications which store their data within the contents of the .app package itself, or within a subfolder in /Applications/.
This should give you an idea of where to look.
Where to Put Application Files

firefox extension don't have write permission on MAC OS X

I have a Firefox extension need to write to one files inside the extension's chrome folder, it works fine on windows and linux, but it give me 0x800520015 NS_ERROR_FILE_ACCESS_DENIED error. it is very strange, I manually set the file to have write permission, it works fine then.
My question is where should I set something to tell MAC OS to give write permission to that file.
Thanks.
Which "chrome" folder (post the path)? If you're talking about application's chrome folder, it's a bad idea to write there; newer Windows will not let you do that either.
[edit] so if it's in the extension, you may have the wrong permissions set in your XPI file accidentally. You can change the permissions from your extension (see nsIFile.permissions) or create a proper ZIP while packaging. (Can you post the ZIP file to verify?)
Anyway, why do you want to write to extension's folder? It's usually a bad idea.

Resources