• Stars
    star
    374
  • Rank 114,346 (Top 3 %)
  • Language
    Swift
  • License
    MIT License
  • Created almost 9 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Command line program that detects unused resource strings in an iOS or OS X application.

Abandoned Resource String Detection

This command line program detects unused resource strings in an iOS or OS X application.

Updated to Swift 3, thanks to @astaeck on Oct-17-2016

Usage

Open a Terminal to the directory which contains the AbandonedStrings executable, and run the following command:

$ ./AbandonedStrings /Users/your-username/path/to/source/code

What to expect

If a .strings file contains…

"some_string_identifier" = "Some Display Text";

…this program will consider that resource string to be abandoned if…

"some_string_identifier"

…is not found in any of the source code files (namely, files with a .h, .m, .swift or .jsbundle extension).

More details

This program searches through the source code files in an iOS app project, looking for resource strings (in a .strings file) whose identifiers are not referenced by the application's source code.

The search logic does not take into account if code is commented out, so it won't be as reliable if your application has a lot of commented-out code.

It also does not try to determine the context in which string identifiers are used, such as whether or not the string is being used to look up a localized string value or if it just happens to match a resource string identifier by coincidence.

Also, this program is ineffective if resource string identifiers are referenced via constants or dynamically constructed.

Disclaimer

As noted above, this program uses a simple heuristic and is not guaranteed to produce perfect results for every codebase.

More Repositories

1

json2swift

A macOS command line tool that generates excellent Swift data models based on JSON data.
Swift
701
star
2

swift-deep-linking

A simple way to consume custom deep link URLs in a Swift app
Swift
468
star
3

swift-ascii-art

Swift program that creates ASCII art from an image
Swift
294
star
4

swift-threading

Simplified thread marshaling with a custom Swift operator function
Swift
228
star
5

equatable-code-generator

A Swift utility function that generates Equatable protocol code for any object.
Swift
125
star
6

Wizardry

Reusable way to implement the Wizard UI design in iOS apps
Swift
93
star
7

swift-places

A universal iOS 8 app that makes network calls, written in Swift.
Swift
79
star
8

swift-factory

Shows how to instantiate classes by name in Swift.
Swift
67
star
9

function-composition-in-swift

An interactive introduction to function composition in Swift 3.
Swift
59
star
10

swift-tic-tac-toe

Tic-tac-toe implemented in Swift
Swift
53
star
11

sustainable-coding

A document which describes my ever-evolving perspective on the strive for excellence as a software developer.
51
star
12

reflectable-enum

Shows how to simplify accessing properties in the associated values of Swift enums
Swift
47
star
13

break-a-dollar

Swift code that counts how many ways you can break a dollar
Swift
29
star
14

iOSLogin

This iOS 4 project contains a reusable controller and view for authenticating user credentials. The demo app shows how to replace the default UI with a custom view, which uses the same LoginViewController class.
Objective-C
27
star
15

command-line-calculator

Command line calculator written in Swift.
Swift
26
star
16

iOS-Workflow

A lightweight workflow component for iOS applications.
Objective-C
15
star
17

CustomCellDemo

Shows how to create a custom table view cell using Interface Builder in iOS 4.
Objective-C
11
star
18

Swiftogram

Creating histograms with the Swift language
Swift
10
star
19

Simple-Genetic-Algorithm-in-Objective-C

A "Hello, World!" of genetic algorithms, written in Objective-C.
Objective-C
9
star
20

swift-morse-code

Swift app that converts text to Morse code and plays it out loud
Swift
7
star
21

swift-agent

Thread-safe mutable state in Swift
Swift
6
star
22

elixir_wordsets

Elixir program that uses parallel processing to discover symmetrical word combinations
Elixir
5
star
23

swift-caesar-cipher

A functional implementation of the Caesar cipher in Swift
Swift
5
star
24

dry-munging-kata

Swift implementation of Dave Thomas's DRY Fusion data processing exercise
Swift
4
star
25

transitive-dependencies-kata

Swift implementation of Dave Thomas's Transitive Dependencies programming exercise
Swift
4
star
26

8QueensGeneticAlgorithm

A genetic algorithm written in Objective-C that solves the 8 Queens puzzle.
Objective-C
3
star
27

functional-objc

Reduce, map, and filter methods for NSArray
Objective-C
1
star
28

Auto-Layout-Demo

Shows how to use layout constraints in iOS 6 to center two columns of labels.
Objective-C
1
star