Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 947 Bytes

README.md

File metadata and controls

20 lines (16 loc) · 947 Bytes

iOS Unused Keys

📝 A script that finds unused localized strings generated by SwiftGen.

How it works

  1. It finds all string keys in .strings files
  2. Converts the keys into Localize generated format: "homeScreen.FULL.15.main_title. => HomeScreen.Full._15.mainTitle
  3. Searches through the source code and finds which keys are not used

Usage

  1. Open the project and build
  2. Find UnusedKeys executable file in Products folder in the Project Navigator in XCode
  3. Drag and drop to your terminal
  4. Pass a directory which contains your .strings file as the first command line argument
  5. Pass directories where you want to search in.
  6. Press enter. Magic 🪄

Example: /Users/username/Library/Developer/Xcode/DerivedData/UnusedKeys-abc/Build/Products/Debug/UnusedKeys /Users/username/Projects/AwesomeProject/Resources /Users/username/Projects/AwesomeProject/

Disclaimer

This script is not guaranteed to process perfectly