A Mac app for checking Xcode projects for unused resources

Related tags

Unused
Overview
Issues
  • Please add support for Xcode 5 images.xcassets

    Please add support for Xcode 5 images.xcassets

    If my images are located in images.xcassets folder & I use this folder's sub-folder for image path like [SKTexture textureWithImageNamed:@"Rocket"] - where @"Rocket" is a sub-folder name (which is includes the real png file) - the Unused app marks all the images (which is really used) as unused.

    opened by EvgenyKarkan 3
  • It'd be nice if you could resize the Unused window to be larger

    It'd be nice if you could resize the Unused window to be larger

    There's not much space to view the image paths with the current window size. It'd be nice if you could resize the Unused window to be larger (in both horizontal and vertical dimensions).

    opened by natan 2
  • check storyboard when checking for xib

    check storyboard when checking for xib

    added checking in storyboard when checking for xib is selected

    opened by RolandasRazma 2
  • Tweaks and fixes

    Tweaks and fixes

    Hi!

    First of all thanks for sharing your code. I found it very useful! Although in original state it doesn't work for me :( I found some drawbacks, namely:

    1. your code supposes that all images appear in files with extension, but methods like imageNamed: work well without extensions. [critical issue]
    2. lack of support for scanning plist (but I think it would be very convenient, for example Info.plist) [enhancement]
    3. using some benchmarking I found that your core scanning exec command via "find ... -exec" is 3x slower than simple pipe construction, i.e. "cat file | grep -o imageName" [enhancement]
    4. also I propose trying to filter image names like: "Section_0.png", "Section_1.png", etc. These image names can possibly be created in code by [NSString stringWithFormat:@"Section_%d", (int)] constructions and not by its original file names. So I made tricky implementation of this feature (NB: it can be turned off by SHOULD_FILTER_ENUM_VARIANTS define) [new feature].

    To sum up I implemented above points and if you will find it useful and correct — please include it in your original repository. Thanks!

    opened by 4ndrey 2
  • Resizable Main Window

    Resizable Main Window

    Hi Jeff, I took a fork of your project and made the main window resizable, so that the tableview can expand to show the full file path. I also anchored the controls to their nearest corner so that the controls don't float.

    opened by IainDelaney 1
  • Include storyboard search too

    Include storyboard search too

    It would be super useful if it includes storyboard search, along with the existing options.

    opened by sasikiran 1
  • Doesn't work well for universal builds with image names:

    Doesn't work well for universal builds with image names:

    For a universal build, when you have image names:

    invite_twitter.png [email protected] invite_twitter~ipad.png [email protected]~ipad.png

    invite_twitter~ipad~ipad and [email protected]~ipad are images for iPad and are automatically loaded by the application.

    However, Unused app thinks those files are really unused.

    opened by sasikiran 1
  • isValidImageAtPath seems to be returning the opposite of what it should

    isValidImageAtPath seems to be returning the opposite of what it should

    I tried running this on one of my apps and it seemed to execute way to fast with 0 results. I did a bit of digging and notices that it was processing very few images. I think the cause of that is the isValidImageAtPath method was filtering out everything but "system" images (such as icon, default, etc). My guess is the intention was to filter those out, and leaving everything else in. I changed line 342 to this: return !(has2xImage || isThirdPartyBundle || isNamedDefault || isNamedIcon || isUniversalImage); and it seemed to at least process all the images properly.

    Please let me know if this is not the correct assumption.

    opened by pip8786 1
  • Add pdf support + slight refactor

    Add pdf support + slight refactor

    Add pdf support.

    opened by zapjonny 0
  • how to resolve image in Images.xcassets?

    how to resolve image in Images.xcassets?

    in Images.xcassets, there is different name between Images.xcassets and image ...

    opened by yolynn-go 0
  • It crashs on Xcode 7.1 & OS X 10.11.1

    It crashs on Xcode 7.1 & OS X 10.11.1

    crash message


    Process: Unused [59136] Path: /Users/USER/Library/Developer/Xcode/DerivedData/Unused-beclpkhgtkonvkbgvtcdwhquktce/Build/Products/Debug/Unused.app/Contents/MacOS/Unused Identifier: com.jeffhodnett.Unused Version: 1.1 (1) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: Unused [59136] User ID: 501

    Date/Time: 2015-11-03 17:51:42.117 +0800 OS Version: Mac OS X 10.11.1 (15B42) Report Version: 11 Anonymous UUID: 85DE645C-46C3-A892-0E96-9C2F7E236D08

    Time Awake Since Boot: 700000 seconds

    System Integrity Protection: enabled

    Crashed Thread: 51 Dispatch queue: com.apple.root.default-qos

    Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

    Application Specific Information: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to set posix_spawn_file_actions for fd -1 at index 0 with errno 9' terminating with uncaught exception of type NSException abort() called

    opened by MicroLearner 1
  • Directories with spaces in the name are not searched

    Directories with spaces in the name are not searched

    Problem: for filename in find %@ -name '*.%@'; do cat $filename 2>/dev/null | grep -o %@ ; done

    The for filename part will separate file names by the space character, so if you want to search in a file "/Users/XXX/Desktop/Test/Classes/UI Animations/Constants.h", it would try and search "/Users/XXX/Desktop/Test/Classes/UI" and "Animations/Constants.h" and not find either.

    Solution: find %@ -name '*.%@' -exec grep -o '%@' {} ;

    This is a good deal faster and will use the whole filename as intended.

    opened by NightIsland 1
  • It finds resources that are actually in use

    It finds resources that are actually in use

    I have the following project structure: Project/

    • Images/
    • Project/*.(m|h|xib)
    • Project.xcodeproj

    The folder that I set in Unused is top-level Project folder.

    It finds for example album_photo_bg.png which is used.

    Project$ grep -R album_photo_bg .
    ./Project/DVPhotoViewCell.xib:                                          <string key="NSResourceName">album_photo_bg.png</string>
    ./Project/DVPhotoViewCell.xib:          <string key="album_photo_bg.png">{107, 97}</string>
    ./Project/DVPhotoViewController.xib:                                            <string key="NSResourceName">album_photo_bg.png</string>
    ./Project/DVPhotoViewController.xib:            <string key="album_photo_bg.png">{107, 97}</string>
    ./Project.xcodeproj/project.pbxproj:        DC258482175E37BB0009DF75 /* album_photo_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = DC258480175E37BB0009DF75 /* album_photo_bg.png */; };
    ./Project.xcodeproj/project.pbxproj:        DC258483175E37BB0009DF75 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = DC258481175E37BB0009DF75 /* [email protected] */; };
    ./Project.xcodeproj/project.pbxproj:        DC258480175E37BB0009DF75 /* album_photo_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = album_photo_bg.png; sourceTree = "<group>"; };
    ./Project.xcodeproj/project.pbxproj:        DC258481175E37BB0009DF75 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
    ./Project.xcodeproj/project.pbxproj:                DC258480175E37BB0009DF75 /* album_photo_bg.png */,
    ./Project.xcodeproj/project.pbxproj:                DC258481175E37BB0009DF75 /* [email protected] */,
    ./Project.xcodeproj/project.pbxproj:                DC258482175E37BB0009DF75 /* album_photo_bg.png in Resources */,
    ./Project.xcodeproj/project.pbxproj:                DC258483175E37BB0009DF75 /* [email protected] in Resources */,
    
    opened by kolyuchiy 5
  • code analysis too

    code analysis too

    from tiwtter:

    @ScottDavisRVA

    it might prove useful to also be able to find class files that go unreferenced. Possibly even unused methods as well.

    enhancement 
    opened by jeffhodnett 2
  • It'd be nice if you could ignore/whitelist certain image paths

    It'd be nice if you could ignore/whitelist certain image paths

    Say you pull in a third party framework (eg. KIF) that has image resources for a tutorial page. These aren't ever compiled in to the app, but they show up as unused in Unused.app, creating extra noise that will always be there. It'd be nice if you could "ignore" results (triggered by Delete key or another action) which would put these in a .unusedignore file alongside the Xcode project. Alternatively you could use support a .unusedignore file format without adding UI, I'd say the .gitgnore format is a fine start.

    enhancement 
    opened by natan 0
  • Image file extension

    Image file extension

    Fix issue with images names that do not having file extensions not coming up in the results.

    I.e

    [UIImage imageNamed:@"some_image_name"]

    not being checked as it does not have a file extension

    opened by jeffhodnett 1
Owner
Jeff Hodnett
Jeff Hodnett
The easiest way to install and switch between multiple versions of Xcode - with a mouse click.

Xcodes.app The easiest way to install and switch between multiple versions of Xcode. If you're looking for a command-line version of Xcodes.app, try x

Robots and Pencils 1.2k Aug 5, 2021
OS X and iOS application and framework to play with the Apple Push Notification service (APNs)

Pusher OS X and iOS application and framework to play with the Apple Push Notification service (APNs) Installation Install the Mac app using Homebrew

noodlewerk 6.1k Jul 29, 2021
Use the Touch Bar on any Mac

Touch Bar Simulator Use the Touch Bar on any Mac Launch the Touch Bar simulator from anywhere without needing to have Xcode installed, whereas Apple r

Sindre Sorhus 1.5k Aug 4, 2021
a Cocoa GUI for /etc/hosts

Hosts, a system preference pane to manage your hosts file Hosts adds a preference pane to your system preferences which lets you toggle your host file

Voxin Muyli 1.5k Aug 3, 2021
:closed_book: Swift Logging Utility for Xcode Google Docs

QorumLogs Swift Logging Utility in Xcode & Google Docs Log Levels class MyAwesomeViewController: UIViewController { override func viewDidLoad() {

Goktug Yilmaz 782 Jul 16, 2021
The easiest way to get started with PostgreSQL on the Mac

Postgres.app The easiest way to run PostgreSQL on your Mac Includes everything you need to get started with PostgreSQL Comes with a pretty GUI to star

Postgres.app 5.8k Aug 1, 2021
A free, native Apple macOS app for testing HTTP/REST endpoints

About CocoaRestClient is a Mac OS X app for testing HTTP/Restful endpoints. I love curl, but sometimes I need my output XML or JSON pretty printed. I

Mike Mattozzi 2.2k Aug 2, 2021
The Git interface you've been missing all your life has finally arrived.

GitUp Work quickly, safely, and without headaches. The Git interface you've been missing all your life has finally arrived. Git recently celebrated it

GitUp 9.8k Jul 31, 2021
MySQL/MariaDB database management for macOS

Sequel Pro Sequel Pro is a fast, easy-to-use Mac database management application for working with MySQL & MariaDB databases. You can find more details

Sequel Pro 8.4k Aug 1, 2021
MySQL/MariaDB database management for macOS

Sequel Ace Sequel Ace is the "sequel" to longtime macOS tool Sequel Pro. Sequel Ace is a fast, easy-to-use Mac database management application for wor

Sequel-Ace 3.4k Aug 5, 2021
Apache NetBeans

Apache NetBeans Apache NetBeans is an open source development environment, tooling platform, and application framework. Build status GitHub actions Tr

The Apache Software Foundation 1.6k Aug 4, 2021
I got tired of manually exporting every icon size (for Xcode and more), so I made an app to do it.

Easily import, modify, and export icons! Features Natively Exports Xcode iOS MacOS Message Apple Watch Exports JSON for 1 drag import Special Files .i

Liam Rosenfeld 69 Jul 24, 2021
A macOS app which helps you manage dependency releases in your Podfile.

Pods Updater Why this app? I believe it should be up to the developer to determine the exact versions of dependencies used in their projects. When add

Kizito Nwose 516 Jul 23, 2021
Fork of Pieter's nice git GUI for OS X. Includes branch/tag sidebar and various fixes. Current development focus is on removing legacy git command line usage in favour of libgit2 and objective-git.

What is GitX? GitX is a graphical client for the git version control system, written specifically for OS X Mavericks. This means that it has a native

Rowan James 2.1k Jul 31, 2021