For clearer data management, I created a new Swift file called PathsToFolders with simple a func onSelectPaths ( _ sender : NSButton ) After this, the user will be able to delete cached file(s). The first action will redirect the user to a specific path in Finder, while the second will add a selected path to the array. This one should have pinned all button delegates and delegate two actions: Now, let’s make the NSWindowController for managing data & actions. Eventually, my Clean Xcode window will look like this: And, last but not least, the „move to trash” button. This is just to view the files before deleting them. Additionally, I added Check files buttons that will redirect the user to Finder. I decided to use NSButton with check option for these paths. Library/Application Support/MobileSync/Backup Library/Developer/Xcode/iOS DeviceSupport Based on our previous tutorial, we will need 6 paths for Xcode cache files: What we need is a Window object ( NSWindow) which is also automatically created. Since we don’t need a main menu bar, let’s delete it. After creating a new project, let's go to the automatically created MainMenu.xib file.
I prefer not to use Storyboards, so in this tutorial we will use the xib window manager.
So choose Cocoa App and give a product name for the app. First, we need to create a new Xcode project - directly for macOS.